mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Merge pull request #492 from XinFinOrg/xdc-05
XDC-05 remove 1s waiting time in miner
This commit is contained in:
commit
04cf52bead
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue