Skip to content

Commit e988545

Browse files
committed
Merge pull request #1761 from CJentzsch/patch-3
fix block time issue
2 parents b2c17a5 + 0fda4c4 commit e988545

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

miner/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ func (self *worker) commitNewWork() {
434434
tstart := time.Now()
435435
parent := self.chain.CurrentBlock()
436436
tstamp := tstart.Unix()
437-
if parent.Time().Cmp(new(big.Int).SetInt64(tstamp)) != 1 {
437+
if parent.Time().Cmp(new(big.Int).SetInt64(tstamp)) >= 0 {
438438
tstamp = parent.Time().Int64() + 1
439439
}
440440
// this will ensure we're not going off too far in the future

0 commit comments

Comments
 (0)