miner: fix inconsistent time unit, close XFN-59 (#1633)

This commit is contained in:
Daniel Liu 2025-11-03 17:23:10 +08:00 committed by GitHub
parent d451580b37
commit f90a12d9f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -388,7 +388,7 @@ func getResetTime(chain *core.BlockChain, minePeriod int) time.Duration {
if resetTime > minePeriodDuration || resetTime <= 0 {
resetTime = minePeriodDuration
}
log.Debug("[update] Miner worker timer reset", "resetMilliseconds", resetTime.Milliseconds(), "minePeriodSec", minePeriod, "currentBlockTimeSec", fmt.Sprintf("%d", currentBlockTime), "currentSystemTimeSec", fmt.Sprintf("%d.%03d", nowTime/1000, nowTime%1000))
log.Debug("[update] Miner worker timer reset", "resetTimeSec", resetTime.Seconds(), "minePeriodSec", minePeriod, "currentBlockTimeSec", fmt.Sprintf("%d", currentBlockTime), "currentSystemTimeSec", fmt.Sprintf("%d.%03d", nowTime/1000, nowTime%1000))
return resetTime
}