remove 1s waiting time in miner

This commit is contained in:
geruiwang 2024-03-14 20:17:40 +08:00
parent 4938ba79bd
commit 28480b1a61

View file

@ -563,7 +563,7 @@ func (self *worker) commitNewWork() {
tstamp = parent.Time().Int64() + 1
}
// this will ensure we're not going off too far in the future
if now := time.Now().Unix(); tstamp > now+1 {
if now := time.Now().Unix(); tstamp > now {
wait := time.Duration(tstamp-now) * time.Second
log.Info("Mining too far in the future", "wait", common.PrettyDuration(wait))
time.Sleep(wait)