diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-04 19:27:17 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-04 19:27:17 +0800 |
commit | 2683aac9b0505bf7744da5f0d0d0a9040e765723 (patch) | |
tree | d780c81c29d5ba7dfd59141f83be5d873dbc6861 /miner/worker.go | |
parent | c20d04ca675115bac1422c813212bb7244e32c62 (diff) | |
download | go-tangerine-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar go-tangerine-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar.gz go-tangerine-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar.bz2 go-tangerine-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar.lz go-tangerine-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar.xz go-tangerine-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar.zst go-tangerine-2683aac9b0505bf7744da5f0d0d0a9040e765723.zip |
Make sure we're not mining on an invalid TS
Diffstat (limited to 'miner/worker.go')
-rw-r--r-- | miner/worker.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/miner/worker.go b/miner/worker.go index 4385b51c8..77b8406cb 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -207,6 +207,9 @@ func (self *worker) commitNewWork() { defer self.uncleMu.Unlock() block := self.chain.NewBlock(self.coinbase) + if block.Time() == self.chain.CurrentBlock().Time() { + block.Header().Time++ + } self.current = env(block, self.eth) for _, ancestor := range self.chain.GetAncestors(block, 7) { |