فهرست منبع

Make sure we're not mining on an invalid TS

obscuren 10 سال پیش
والد
کامیت
2683aac9b0
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      miner/worker.go

+ 3 - 0
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) {