parent
a0fbf5464a
commit
f79f9deeb3
|
@ -485,6 +485,7 @@ proc backendLoop*(node: Eth2Node) {.async.} =
|
||||||
var peerCheck = node.peers.getOrDefault(item.peer)
|
var peerCheck = node.peers.getOrDefault(item.peer)
|
||||||
if isNil(peerCheck):
|
if isNil(peerCheck):
|
||||||
var peer = node.getPeer(item.peer)
|
var peer = node.getPeer(item.peer)
|
||||||
|
peer.wasDialed = true
|
||||||
info "Handshaking with new peer", peer = item.peer.pretty(),
|
info "Handshaking with new peer", peer = item.peer.pretty(),
|
||||||
addresses = item.addresses
|
addresses = item.addresses
|
||||||
let fut = initializeConnection(peer)
|
let fut = initializeConnection(peer)
|
||||||
|
|
|
@ -106,7 +106,7 @@ p2pProtocol BeaconSync(version = 1,
|
||||||
if theirStatus.isSome:
|
if theirStatus.isSome:
|
||||||
await peer.handleInitialStatus(node, ourStatus, theirStatus.get)
|
await peer.handleInitialStatus(node, ourStatus, theirStatus.get)
|
||||||
else:
|
else:
|
||||||
warn "Status response not received in time"
|
warn "Status response not received in time", peer = peer.id.pretty()
|
||||||
|
|
||||||
onPeerDisconnected do (peer: Peer):
|
onPeerDisconnected do (peer: Peer):
|
||||||
libp2p_peers.set peer.network.peers.len.int64
|
libp2p_peers.set peer.network.peers.len.int64
|
||||||
|
@ -234,4 +234,3 @@ proc handleInitialStatus(peer: Peer,
|
||||||
|
|
||||||
except CatchableError:
|
except CatchableError:
|
||||||
warn "Failed to sync with peer", peer, err = getCurrentExceptionMsg()
|
warn "Failed to sync with peer", peer, err = getCurrentExceptionMsg()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue