Merge pull request #859 from XinFinOrg/exp_timeout_logs

refactor: more logs on countdown
This commit is contained in:
benjamin202410 2025-02-16 16:34:17 -08:00 committed by GitHub
commit 2244ac7de1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,13 +85,14 @@ func (t *CountdownTimer) startTimer(i interface{}, currentRound, highestRound ty
}()
timer.Reset(t.durationHelper.GetTimeoutDuration(currentRound, highestRound))
case info := <-t.resetc:
log.Debug("Reset countdown timer")
currentRound = info.currentRound
highestRound = info.highestRound
duration := t.durationHelper.GetTimeoutDuration(currentRound, highestRound)
log.Debug("Reset countdown timer", "duration", duration, "currentRound", currentRound, "highestRound", highestRound)
if !timer.Stop() {
<-timer.C
}
timer.Reset(t.durationHelper.GetTimeoutDuration(currentRound, highestRound))
timer.Reset(duration)
}
}
}