Commit e9885458 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke

Merge pull request #1761 from CJentzsch/patch-3

fix block time issue
parents b2c17a5a 0fda4c4e
...@@ -434,7 +434,7 @@ func (self *worker) commitNewWork() { ...@@ -434,7 +434,7 @@ func (self *worker) commitNewWork() {
tstart := time.Now() tstart := time.Now()
parent := self.chain.CurrentBlock() parent := self.chain.CurrentBlock()
tstamp := tstart.Unix() tstamp := tstart.Unix()
if parent.Time().Cmp(new(big.Int).SetInt64(tstamp)) != 1 { if parent.Time().Cmp(new(big.Int).SetInt64(tstamp)) >= 0 {
tstamp = parent.Time().Int64() + 1 tstamp = parent.Time().Int64() + 1
} }
// this will ensure we're not going off too far in the future // this will ensure we're not going off too far in the future
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment