mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 18:00:46 +00:00
Merge pull request #859 from XinFinOrg/exp_timeout_logs
refactor: more logs on countdown
This commit is contained in:
commit
2244ac7de1
1 changed files with 3 additions and 2 deletions
|
|
@ -85,13 +85,14 @@ func (t *CountdownTimer) startTimer(i interface{}, currentRound, highestRound ty
|
||||||
}()
|
}()
|
||||||
timer.Reset(t.durationHelper.GetTimeoutDuration(currentRound, highestRound))
|
timer.Reset(t.durationHelper.GetTimeoutDuration(currentRound, highestRound))
|
||||||
case info := <-t.resetc:
|
case info := <-t.resetc:
|
||||||
log.Debug("Reset countdown timer")
|
|
||||||
currentRound = info.currentRound
|
currentRound = info.currentRound
|
||||||
highestRound = info.highestRound
|
highestRound = info.highestRound
|
||||||
|
duration := t.durationHelper.GetTimeoutDuration(currentRound, highestRound)
|
||||||
|
log.Debug("Reset countdown timer", "duration", duration, "currentRound", currentRound, "highestRound", highestRound)
|
||||||
if !timer.Stop() {
|
if !timer.Stop() {
|
||||||
<-timer.C
|
<-timer.C
|
||||||
}
|
}
|
||||||
timer.Reset(t.durationHelper.GetTimeoutDuration(currentRound, highestRound))
|
timer.Reset(duration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue