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
|
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk
|
||||||
|
|
||||||
# debugging tools + testing tools
|
# 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
|
TOOLS_DIRS := premix tests waku
|
||||||
# comma-separated values for the "clean" target
|
# comma-separated values for the "clean" target
|
||||||
TOOLS_CSV := $(subst $(SPACE),$(COMMA),$(TOOLS))
|
TOOLS_CSV := $(subst $(SPACE),$(COMMA),$(TOOLS))
|
||||||
|
|
|
@ -53,13 +53,9 @@ proc setupWakuRPC*(node: EthereumNode, keys: WhisperKeys, rpcsrv: RpcServer) =
|
||||||
## pow: The new PoW requirement.
|
## pow: The new PoW requirement.
|
||||||
##
|
##
|
||||||
## Returns true on success and an error on failure.
|
## Returns true on success and an error on failure.
|
||||||
# Note: If any of the `peer.powRequirement` calls fails, we do not care and
|
# Note: `setPowRequirement` does not raise on failures of sending the update
|
||||||
# don't see this as an error. Could move this to `setPowRequirement` if
|
# to the peers. Hence in theory this should not causes errors.
|
||||||
# this is the general behaviour we want.
|
waitFor node.setPowRequirement(pow)
|
||||||
try:
|
|
||||||
waitFor node.setPowRequirement(pow)
|
|
||||||
except CatchableError:
|
|
||||||
trace "setPowRequirement error occured"
|
|
||||||
result = true
|
result = true
|
||||||
|
|
||||||
# TODO: change string in to ENodeStr with extra checks
|
# 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.
|
## pow: The new PoW requirement.
|
||||||
##
|
##
|
||||||
## Returns true on success and an error on failure.
|
## Returns true on success and an error on failure.
|
||||||
# Note: If any of the `peer.powRequirement` calls fails, we do not care and
|
# Note: `setPowRequirement` does not raise on failures of sending the update
|
||||||
# don't see this as an error. Could move this to `setPowRequirement` if
|
# to the peers. Hence in theory this should not causes errors.
|
||||||
# this is the general behaviour we want.
|
waitFor node.setPowRequirement(pow)
|
||||||
try:
|
|
||||||
waitFor node.setPowRequirement(pow)
|
|
||||||
except CatchableError:
|
|
||||||
trace "setPowRequirement error occured"
|
|
||||||
result = true
|
result = true
|
||||||
|
|
||||||
# TODO: change string in to ENodeStr with extra checks
|
# TODO: change string in to ENodeStr with extra checks
|
||||||
|
|
|
@ -45,12 +45,12 @@ type
|
||||||
name: "fleet" }: Fleet
|
name: "fleet" }: Fleet
|
||||||
|
|
||||||
bootnodes* {.
|
bootnodes* {.
|
||||||
desc: "Comma separated enode URLs for P2P discovery bootstrap."
|
desc: "Enode URL to bootstrap P2P discovery with. Argument may be repeated."
|
||||||
name: "bootnodes" }: seq[string]
|
name: "bootnode" }: seq[string]
|
||||||
|
|
||||||
staticnodes* {.
|
staticnodes* {.
|
||||||
desc: "Comma separated enode URLs to directly connect with."
|
desc: "Enode URL to directly connect with. Argument may be repeated."
|
||||||
name: "staticnodes" }: seq[string]
|
name: "staticnode" }: seq[string]
|
||||||
|
|
||||||
whisper* {.
|
whisper* {.
|
||||||
desc: "Enable the Whisper protocol."
|
desc: "Enable the Whisper protocol."
|
||||||
|
|
|
@ -59,12 +59,12 @@ proc initNodeCmd(nodeType: NodeType, shift: int, staticNodes: seq[string] = @[],
|
||||||
result.cmd &= "--discovery:on" & " "
|
result.cmd &= "--discovery:on" & " "
|
||||||
if bootNodes.len > 0:
|
if bootNodes.len > 0:
|
||||||
for bootNode in bootNodes:
|
for bootNode in bootNodes:
|
||||||
result.cmd &= "--bootnodes:" & bootNode & " "
|
result.cmd &= "--bootnode:" & bootNode & " "
|
||||||
else:
|
else:
|
||||||
result.cmd &= "--discovery:off" & " "
|
result.cmd &= "--discovery:off" & " "
|
||||||
if staticNodes.len > 0:
|
if staticNodes.len > 0:
|
||||||
for staticNode in staticNodes:
|
for staticNode in staticNodes:
|
||||||
result.cmd &= "--staticnodes:" & staticNode & " "
|
result.cmd &= "--staticnode:" & staticNode & " "
|
||||||
|
|
||||||
result.master = master
|
result.master = master
|
||||||
result.enode = $enode
|
result.enode = $enode
|
||||||
|
|
Loading…
Reference in New Issue