Sync: Add messages about `eth/65` handshake parameters

Signed-off-by: Jamie Lokier <jamie@shareable.org>
This commit is contained in:
Jamie Lokier 2021-07-27 02:32:50 +01:00
parent 57de56bab6
commit 83b15c83d2
No known key found for this signature in database
GPG Key ID: CBC25C68435C30A2
1 changed files with 10 additions and 0 deletions

View File

@ -34,6 +34,7 @@ type
const
tracePackets* = true # Set `true` or `false` to control packet traces.
traceHandshakes* = true
const
maxStateFetch* = 384
@ -78,6 +79,15 @@ p2pProtocol eth(version = ethVersion,
forkId,
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:
trace "Peer for a different network (networkId)", peer,
expectNetworkId=network.networkId, gotNetworkId=m.networkId