From 6dc46d3341dc5fa25bd005f9606de258874139be Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 1 Dec 2014 20:18:09 +0100 Subject: Changed the way transactions are being added to the transaction pool --- miner/miner.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'miner/miner.go') diff --git a/miner/miner.go b/miner/miner.go index 9152d532b..6fe5a18ac 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -203,7 +203,7 @@ func (self *Miner) mine() { // Accumulate the rewards included for this block blockManager.AccumelateRewards(block.State(), block, parent) - block.State().Update(nil) + block.State().Update(ethutil.Big0) minerlogger.Infof("Mining on block. Includes %v transactions", len(transactions)) @@ -211,12 +211,13 @@ func (self *Miner) mine() { nonce := self.pow.Search(block, self.powQuitCh) if nonce != nil { block.Nonce = nonce - lchain := chain.NewChain(chain.Blocks{block}) - _, err := chainMan.TestChain(lchain) + //lchain := chain.NewChain(chain.Blocks{block}) + //_, err := chainMan.TestChain(lchain) + err := chainMan.InsertChain(chain.Blocks{block}) if err != nil { minerlogger.Infoln(err) } else { - chainMan.InsertChain(lchain) + //chainMan.InsertChain(lchain) //self.eth.EventMux().Post(chain.NewBlockEvent{block}) self.eth.Broadcast(wire.MsgBlockTy, []interface{}{block.Value().Val}) -- cgit v1.2.3