File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -964,24 +964,26 @@ proc getStatusPeriod*(
964964 peer: Peer
965965): chronos.Duration =
966966 let
967- localHead = overseer.consensusManager.dag.head.bid
967+ dag = overseer.consensusManager.dag
968+ localHead = dag.head.bid
968969 peerHead = peer.getHeadBlockId ()
969970 peerFinalizedCheckpoint = peer.getFinalizedCheckpoint ()
971+ secondsPerSlot = int (dag.cfg.timeParams.SECONDS_PER_SLOT )
970972
971973 if localHead.slot.epoch () < peerFinalizedCheckpoint.epoch:
972974 # We are behind peer's finalized checkpoint, performing forward syncing.
973975 # 10 slots (mainnet: 2.minutes)
974- chronos.seconds (10 * int ( SECONDS_PER_SLOT ) )
976+ chronos.seconds (10 * secondsPerSlot )
975977 else :
976978 if peerHead.slot.epoch () - peerFinalizedCheckpoint.epoch >= 3 :
977979 # In periods of non-finality we try to follow every peer's head, in
978980 # this case we should update peer's status very often.
979981 # 1 slot (mainnet: 12.seconds)
980- chronos.seconds (1 * int ( SECONDS_PER_SLOT ) )
982+ chronos.seconds (1 * secondsPerSlot )
981983 else :
982984 # Node is optimistically synced or almost synced.
983985 # 5 slots (mainnet: 1.minutes)
984- chronos.seconds (5 * int ( SECONDS_PER_SLOT ) )
986+ chronos.seconds (5 * secondsPerSlot )
985987
986988func getMissingSidecarsRoots (entry: SyncDagEntryRef ): seq [BlockId ] =
987989 var res: seq [BlockId ]
You can’t perform that action at this time.
0 commit comments