Sync: Add messages about `eth/65` handshake parameters
Signed-off-by: Jamie Lokier <jamie@shareable.org>
This commit is contained in:
parent
57de56bab6
commit
83b15c83d2
|
@ -34,6 +34,7 @@ type
|
||||||
|
|
||||||
const
|
const
|
||||||
tracePackets* = true # Set `true` or `false` to control packet traces.
|
tracePackets* = true # Set `true` or `false` to control packet traces.
|
||||||
|
traceHandshakes* = true
|
||||||
|
|
||||||
const
|
const
|
||||||
maxStateFetch* = 384
|
maxStateFetch* = 384
|
||||||
|
@ -78,6 +79,15 @@ p2pProtocol eth(version = ethVersion,
|
||||||
forkId,
|
forkId,
|
||||||
timeout = chronos.seconds(10))
|
timeout = chronos.seconds(10))
|
||||||
|
|
||||||
|
if traceHandshakes:
|
||||||
|
trace "Handshake: Local and remote networkId",
|
||||||
|
local=network.networkId, remote=m.networkId
|
||||||
|
trace "Handshake: Local and remote genesisHash",
|
||||||
|
local=chain.genesisHash.toHex, remote=m.genesisHash.toHex
|
||||||
|
trace "Handshake: Local and remote forkId",
|
||||||
|
local=(forkId.forkHash.toHex & "/" & $forkId.forkNext),
|
||||||
|
remote=(m.forkId.forkHash.toHex & "/" & $m.forkId.forkNext)
|
||||||
|
|
||||||
if m.networkId != network.networkId:
|
if m.networkId != network.networkId:
|
||||||
trace "Peer for a different network (networkId)", peer,
|
trace "Peer for a different network (networkId)", peer,
|
||||||
expectNetworkId=network.networkId, gotNetworkId=m.networkId
|
expectNetworkId=network.networkId, gotNetworkId=m.networkId
|
||||||
|
|
Loading…
Reference in New Issue