Small fixes/improvements
This commit is contained in:
parent
7e92897b50
commit
776f924e39
2
Makefile
2
Makefile
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue