This repository was archived by the owner on Jan 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
pkg/protocol/engine/syncmanager/trivialsyncmanager Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -260,23 +260,16 @@ func (s *SyncManager) IsNodeSynced() bool {
260
260
return s .isSynced
261
261
}
262
262
263
- func (s * SyncManager ) updateIsFinalizationDelayed (latestFinalizedSlot iotago.SlotIndex , latestCommitmentSlot iotago.SlotIndex ) ( changed bool ) {
263
+ func (s * SyncManager ) updateIsFinalizationDelayed (latestFinalizedSlot iotago.SlotIndex , latestCommitmentSlot iotago.SlotIndex ) {
264
264
s .isFinalizationDelayedLock .Lock ()
265
265
defer s .isFinalizationDelayedLock .Unlock ()
266
266
267
267
if latestCommitmentSlot < latestFinalizedSlot {
268
268
// This should never happen, but if it does, we don't want to panic.
269
- return false
269
+ return
270
270
}
271
271
272
- isFinalizationDelayed := latestCommitmentSlot - latestFinalizedSlot > s .engine .CommittedAPI ().ProtocolParameters ().MaxCommittableAge ()
273
- if s .isFinalizationDelayed != isFinalizationDelayed {
274
- s .isFinalizationDelayed = isFinalizationDelayed
275
-
276
- return true
277
- }
278
-
279
- return false
272
+ s .isFinalizationDelayed = latestCommitmentSlot - latestFinalizedSlot > s .engine .CommittedAPI ().ProtocolParameters ().MaxCommittableAge ()
280
273
}
281
274
282
275
func (s * SyncManager ) IsFinalizationDelayed () bool {
You can’t perform that action at this time.
0 commit comments