Small fixes/improvements

This commit is contained in:
kdeme 2020-01-20 16:18:18 +01:00 committed by zah
parent 7e92897b50
commit 776f924e39
5 changed files with 13 additions and 21 deletions

View File

@ -14,7 +14,7 @@ BUILD_SYSTEM_DIR := vendor/nimbus-build-system
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk
# debugging tools + testing tools
TOOLS := premix persist debug dumper hunter regress tracerTestGen persistBlockTestGen process_dashboard
TOOLS := premix persist debug dumper hunter regress tracerTestGen persistBlockTestGen
TOOLS_DIRS := premix tests waku
# comma-separated values for the "clean" target
TOOLS_CSV := $(subst $(SPACE),$(COMMA),$(TOOLS))

View File

@ -53,13 +53,9 @@ proc setupWakuRPC*(node: EthereumNode, keys: WhisperKeys, rpcsrv: RpcServer) =
## pow: The new PoW requirement.
##
## Returns true on success and an error on failure.
# Note: If any of the `peer.powRequirement` calls fails, we do not care and
# don't see this as an error. Could move this to `setPowRequirement` if
# this is the general behaviour we want.
try:
waitFor node.setPowRequirement(pow)
except CatchableError:
trace "setPowRequirement error occured"
# Note: `setPowRequirement` does not raise on failures of sending the update
# to the peers. Hence in theory this should not causes errors.
waitFor node.setPowRequirement(pow)
result = true
# TODO: change string in to ENodeStr with extra checks

View File

@ -54,13 +54,9 @@ proc setupWhisperRPC*(node: EthereumNode, keys: WhisperKeys, rpcsrv: RpcServer)
## pow: The new PoW requirement.
##
## Returns true on success and an error on failure.
# Note: If any of the `peer.powRequirement` calls fails, we do not care and
# don't see this as an error. Could move this to `setPowRequirement` if
# this is the general behaviour we want.
try:
waitFor node.setPowRequirement(pow)
except CatchableError:
trace "setPowRequirement error occured"
# Note: `setPowRequirement` does not raise on failures of sending the update
# to the peers. Hence in theory this should not causes errors.
waitFor node.setPowRequirement(pow)
result = true
# TODO: change string in to ENodeStr with extra checks

View File

@ -45,12 +45,12 @@ type
name: "fleet" }: Fleet
bootnodes* {.
desc: "Comma separated enode URLs for P2P discovery bootstrap."
name: "bootnodes" }: seq[string]
desc: "Enode URL to bootstrap P2P discovery with. Argument may be repeated."
name: "bootnode" }: seq[string]
staticnodes* {.
desc: "Comma separated enode URLs to directly connect with."
name: "staticnodes" }: seq[string]
desc: "Enode URL to directly connect with. Argument may be repeated."
name: "staticnode" }: seq[string]
whisper* {.
desc: "Enable the Whisper protocol."

View File

@ -59,12 +59,12 @@ proc initNodeCmd(nodeType: NodeType, shift: int, staticNodes: seq[string] = @[],
result.cmd &= "--discovery:on" & " "
if bootNodes.len > 0:
for bootNode in bootNodes:
result.cmd &= "--bootnodes:" & bootNode & " "
result.cmd &= "--bootnode:" & bootNode & " "
else:
result.cmd &= "--discovery:off" & " "
if staticNodes.len > 0:
for staticNode in staticNodes:
result.cmd &= "--staticnodes:" & staticNode & " "
result.cmd &= "--staticnode:" & staticNode & " "
result.master = master
result.enode = $enode