aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-02 03:18:09 +0800
committerobscuren <geffobscura@gmail.com>2014-12-02 03:18:09 +0800
commit6dc46d3341dc5fa25bd005f9606de258874139be (patch)
tree39b5d7dad5a943de4e187f99c93da5aa7fc9f2b8 /miner
parenta3559c5e1b469890bb8d71e9992175febaae31c7 (diff)
downloadgo-tangerine-6dc46d3341dc5fa25bd005f9606de258874139be.tar
go-tangerine-6dc46d3341dc5fa25bd005f9606de258874139be.tar.gz
go-tangerine-6dc46d3341dc5fa25bd005f9606de258874139be.tar.bz2
go-tangerine-6dc46d3341dc5fa25bd005f9606de258874139be.tar.lz
go-tangerine-6dc46d3341dc5fa25bd005f9606de258874139be.tar.xz
go-tangerine-6dc46d3341dc5fa25bd005f9606de258874139be.tar.zst
go-tangerine-6dc46d3341dc5fa25bd005f9606de258874139be.zip
Changed the way transactions are being added to the transaction pool
Diffstat (limited to 'miner')
-rw-r--r--miner/miner.go9
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})