From 19b5f3c1c58169c6b598a6a32484575fe75e0f91 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Wed, 2 Sep 2015 15:13:14 -0700 Subject: [PATCH] Merge pull request #1761 from CJentzsch/patch-3 fix block time issue (cherry picked from commit e98854588b2e31b8743ecca88d2db8f6ab0ff2ae) --- miner/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miner/worker.go b/miner/worker.go index 7b7a680180..d8139fc070 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -431,7 +431,7 @@ func (self *worker) commitNewWork() { tstart := time.Now() parent := self.chain.CurrentBlock() 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 } // this will ensure we're not going off too far in the future