Skip to content

Commit

Permalink
Merge pull request #492 from XinFinOrg/xdc-05
Browse files Browse the repository at this point in the history
XDC-05 remove 1s waiting time in miner
  • Loading branch information
wgr523 committed Mar 15, 2024
2 parents bbab326 + 28480b1 commit 04cf52b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 04cf52b

Please sign in to comment.