Skip to content

Commit

Permalink
Merge pull request #963 from iotaledger/fix/sync-status
Browse files Browse the repository at this point in the history
Fix sync status
  • Loading branch information
alexsporn authored May 7, 2024
2 parents 973fe1e + eda5681 commit ebb1105
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ func (s *SyncManager) updateSyncStatus() (changed bool) {
s.isSyncedLock.Lock()
defer s.isSyncedLock.Unlock()

isSynced := s.IsBootstrapped() && time.Since(s.engine.Clock.Accepted().RelativeTime()) < s.optsSyncThreshold
snapshot := s.engine.Clock.Snapshot()
isSynced := s.IsBootstrapped() && ((snapshot.RelativeAcceptedTime.Sub(snapshot.AcceptedTime)) < s.optsSyncThreshold)
if s.isSynced != isSynced {
s.isSynced = isSynced

Expand Down

0 comments on commit ebb1105

Please sign in to comment.