diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-02 03:18:09 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-02 03:18:09 +0800 |
commit | 6dc46d3341dc5fa25bd005f9606de258874139be (patch) | |
tree | 39b5d7dad5a943de4e187f99c93da5aa7fc9f2b8 /miner | |
parent | a3559c5e1b469890bb8d71e9992175febaae31c7 (diff) | |
download | dexon-6dc46d3341dc5fa25bd005f9606de258874139be.tar.gz dexon-6dc46d3341dc5fa25bd005f9606de258874139be.tar.zst dexon-6dc46d3341dc5fa25bd005f9606de258874139be.zip |
Changed the way transactions are being added to the transaction pool
Diffstat (limited to 'miner')
-rw-r--r-- | miner/miner.go | 9 |
1 files changed, 5 insertions, 4 deletions
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}) |