Set wasDialed.

Add more logging information.
This commit is contained in:
cheatfate 2019-11-06 16:16:31 +02:00
parent a0fbf5464a
commit f79f9deeb3
No known key found for this signature in database
GPG Key ID: 46ADD633A7201F95
2 changed files with 2 additions and 2 deletions

View File

@ -485,6 +485,7 @@ proc backendLoop*(node: Eth2Node) {.async.} =
var peerCheck = node.peers.getOrDefault(item.peer)
if isNil(peerCheck):
var peer = node.getPeer(item.peer)
peer.wasDialed = true
info "Handshaking with new peer", peer = item.peer.pretty(),
addresses = item.addresses
let fut = initializeConnection(peer)

View File

@ -106,7 +106,7 @@ p2pProtocol BeaconSync(version = 1,
if theirStatus.isSome:
await peer.handleInitialStatus(node, ourStatus, theirStatus.get)
else:
warn "Status response not received in time"
warn "Status response not received in time", peer = peer.id.pretty()
onPeerDisconnected do (peer: Peer):
libp2p_peers.set peer.network.peers.len.int64
@ -234,4 +234,3 @@ proc handleInitialStatus(peer: Peer,
except CatchableError:
warn "Failed to sync with peer", peer, err = getCurrentExceptionMsg()