always check whether gossip should be enabled in onslotstart (#2162)
This commit is contained in:
parent
f10f29d829
commit
8b8b25ddac
|
@ -591,6 +591,8 @@ proc onSlotStart(node: BeaconNode, lastSlot, scheduledSlot: Slot) {.async.} =
|
||||||
slot = wallSlot.slot # afterGenesis == true!
|
slot = wallSlot.slot # afterGenesis == true!
|
||||||
nextSlot = slot + 1
|
nextSlot = slot + 1
|
||||||
|
|
||||||
|
defer: await node.updateGossipStatus(slot)
|
||||||
|
|
||||||
beacon_slot.set slot.int64
|
beacon_slot.set slot.int64
|
||||||
beacon_current_epoch.set slot.epoch.int64
|
beacon_current_epoch.set slot.epoch.int64
|
||||||
|
|
||||||
|
@ -649,8 +651,6 @@ proc onSlotStart(node: BeaconNode, lastSlot, scheduledSlot: Slot) {.async.} =
|
||||||
finalizedHead = shortLog(node.chainDag.finalizedHead.blck),
|
finalizedHead = shortLog(node.chainDag.finalizedHead.blck),
|
||||||
finalizedEpoch = shortLog(node.chainDag.finalizedHead.blck.slot.compute_epoch_at_slot())
|
finalizedEpoch = shortLog(node.chainDag.finalizedHead.blck.slot.compute_epoch_at_slot())
|
||||||
|
|
||||||
await node.updateGossipStatus(slot)
|
|
||||||
|
|
||||||
when declared(GC_fullCollect):
|
when declared(GC_fullCollect):
|
||||||
# The slots in the beacon node work as frames in a game: we want to make
|
# The slots in the beacon node work as frames in a game: we want to make
|
||||||
# sure that we're ready for the next one and don't get stuck in lengthy
|
# sure that we're ready for the next one and don't get stuck in lengthy
|
||||||
|
|
Loading…
Reference in New Issue