aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-04 19:27:17 +0800
committerobscuren <geffobscura@gmail.com>2015-04-04 19:27:17 +0800
commit2683aac9b0505bf7744da5f0d0d0a9040e765723 (patch)
treed780c81c29d5ba7dfd59141f83be5d873dbc6861
parentc20d04ca675115bac1422c813212bb7244e32c62 (diff)
downloaddexon-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar
dexon-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar.gz
dexon-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar.bz2
dexon-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar.lz
dexon-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar.xz
dexon-2683aac9b0505bf7744da5f0d0d0a9040e765723.tar.zst
dexon-2683aac9b0505bf7744da5f0d0d0a9040e765723.zip
Make sure we're not mining on an invalid TS
-rw-r--r--miner/worker.go3
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) {