fix flooding of error message
@@ -146,8 +146,11 @@ func (c *roundCalculator) roundInfo(
}
}
if !lastBlockTime.Before(now) {
+ // TODO: if this is the case, the system time is far behind the time of other nodes.
+ // the code below is just to mute the warning, but "panic" may be a better choice.
+ time.Sleep(lastBlockTime.Sub(now))
err = errors.Errorf(
- "last block time %s is a future time, vs now %s",
+ "last block time %s is a future time, vs now %s. it seems that your system time is far behind.\nplease calibrate your system time and restart the chain.",
lastBlockTime,
now,
)
