Pārlūkot izejas kodu

Propagate blocks

obscuren 10 gadi atpakaļ
vecāks
revīzija
0f3c25b265
2 mainītis faili ar 2 papildinājumiem un 3 dzēšanām
  1. 1 3
      cmd/mist/gui.go
  2. 1 0
      miner/worker.go

+ 1 - 3
cmd/mist/gui.go

@@ -412,9 +412,7 @@ func (gui *Gui) update() {
 			switch ev := ev.(type) {
 			case core.NewBlockEvent:
 				gui.processBlock(ev.Block, false)
-				if bytes.Compare(ev.Block.Coinbase(), gui.address()) == 0 {
-					gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil)
-				}
+				gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil)
 
 			case core.TxPreEvent:
 				tx := ev.Tx

+ 1 - 0
miner/worker.go

@@ -131,6 +131,7 @@ func (self *worker) wait() {
 				self.current.block.Header().Nonce = work.Nonce
 
 				self.chain.InsertChain(types.Blocks{self.current.block})
+				self.mux.Post(core.NewMinedBlockEvent{self.current.block})
 			}
 			break
 		}