Address #1695
Better error messages when the beacon node is asked to listen on a reserved port (0) or an already taken one.
This commit is contained in:
parent
d69d89866e
commit
00a8a68671
|
@ -961,8 +961,18 @@ template publicKey*(node: Eth2Node): keys.PublicKey =
|
||||||
|
|
||||||
proc startListening*(node: Eth2Node) {.async.} =
|
proc startListening*(node: Eth2Node) {.async.} =
|
||||||
if node.discoveryEnabled:
|
if node.discoveryEnabled:
|
||||||
node.discovery.open()
|
try:
|
||||||
node.libp2pTransportLoops = await node.switch.start()
|
node.discovery.open()
|
||||||
|
except CatchableError as err:
|
||||||
|
fatal "Failed to start discovery service. UDP port may be already in use"
|
||||||
|
quit 1
|
||||||
|
|
||||||
|
try:
|
||||||
|
node.libp2pTransportLoops = await node.switch.start()
|
||||||
|
except CatchableError:
|
||||||
|
fatal "Failed to start LibP2P transport. TCP port may be already in use"
|
||||||
|
quit 1
|
||||||
|
|
||||||
await node.pubsub.start()
|
await node.pubsub.start()
|
||||||
|
|
||||||
proc start*(node: Eth2Node) {.async.} =
|
proc start*(node: Eth2Node) {.async.} =
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5c81aab54d00bb4cc0921fc9d3ace828b1fcc09f
|
Subproject commit 5d8d1ea648884a460518e7819be2d406e3a4ab0f
|
Loading…
Reference in New Issue