always check whether gossip should be enabled in onslotstart (#2162)

This commit is contained in:
tersec 2020-12-08 18:11:54 +01:00 committed by GitHub
parent f10f29d829
commit 8b8b25ddac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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