handling reconstruction condition internally

This commit is contained in:
Agnish Ghosh 2024-08-18 13:35:16 +05:30
parent e7610ece97
commit 75e1bb616b
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
2 changed files with 3 additions and 3 deletions

View File

@ -1675,6 +1675,8 @@ proc handlePeer*(peer: Peer) {.async: (raises: [CancelledError]).} =
debug "Peer has low score or there no space in PeerPool",
peer = peer, reason = res
await peer.disconnect(FaultOrError)
of PeerStatus.LowCscError:
discard
of PeerStatus.DeadPeerError:
# Peer's lifetime future is finished, so its already dead,
# we do not need to perform gracefull disconect.

View File

@ -1581,9 +1581,7 @@ proc reconstructAndSendDataColumns*(node: BeaconNode) {.async.} =
proc onSlotEnd(node: BeaconNode, slot: Slot) {.async.} =
# Things we do when slot processing has ended and we're about to wait for the
# next slot
if node.config.subscribeAllSubnets:
await node.reconstructAndSendDataColumns()
await node.reconstructAndSendDataColumns()
# By waiting until close before slot end, ensure that preparation for next
# slot does not interfere with propagation of messages and with VC duties.