aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-09-03 06:13:14 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-09-03 03:15:55 +0800
commit19b5f3c1c58169c6b598a6a32484575fe75e0f91 (patch)
tree8f9089ad3b3eb7933d5a1d5eda67c9f268545936
parent2d1ea1a66d407530e47213470527d2ff587eb05f (diff)
downloadgo-tangerine-19b5f3c1c58169c6b598a6a32484575fe75e0f91.tar
go-tangerine-19b5f3c1c58169c6b598a6a32484575fe75e0f91.tar.gz
go-tangerine-19b5f3c1c58169c6b598a6a32484575fe75e0f91.tar.bz2
go-tangerine-19b5f3c1c58169c6b598a6a32484575fe75e0f91.tar.lz
go-tangerine-19b5f3c1c58169c6b598a6a32484575fe75e0f91.tar.xz
go-tangerine-19b5f3c1c58169c6b598a6a32484575fe75e0f91.tar.zst
go-tangerine-19b5f3c1c58169c6b598a6a32484575fe75e0f91.zip
Merge pull request #1761 from CJentzsch/patch-3
fix block time issue (cherry picked from commit e98854588b2e31b8743ecca88d2db8f6ab0ff2ae)
-rw-r--r--miner/worker.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 7b7a68018..d8139fc07 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