Make sure we're not mining on an invalid TS

This commit is contained in:
obscuren 2015-04-04 13:27:17 +02:00
parent c20d04ca67
commit 2683aac9b0
1 changed files with 3 additions and 0 deletions

View File

@ -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) {