aboutsummaryrefslogtreecommitdiffstats
path: root/miner/miner.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-02 18:52:56 +0800
committerobscuren <geffobscura@gmail.com>2014-12-02 18:52:56 +0800
commit64f35ba8d1f31d6821a0a1bf946c71396a996f30 (patch)
tree375a081536c7c0b329a3b0c2e812ff05f81dd64c /miner/miner.go
parent616066a598933df7ef126186eb9c647094f665ca (diff)
parent99481a245adc2c4814ab6b38d94d63114f7bbb15 (diff)
downloadgo-tangerine-64f35ba8d1f31d6821a0a1bf946c71396a996f30.tar
go-tangerine-64f35ba8d1f31d6821a0a1bf946c71396a996f30.tar.gz
go-tangerine-64f35ba8d1f31d6821a0a1bf946c71396a996f30.tar.bz2
go-tangerine-64f35ba8d1f31d6821a0a1bf946c71396a996f30.tar.lz
go-tangerine-64f35ba8d1f31d6821a0a1bf946c71396a996f30.tar.xz
go-tangerine-64f35ba8d1f31d6821a0a1bf946c71396a996f30.tar.zst
go-tangerine-64f35ba8d1f31d6821a0a1bf946c71396a996f30.zip
merge errors fixed
Diffstat (limited to 'miner/miner.go')
-rw-r--r--miner/miner.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/miner/miner.go b/miner/miner.go
index c5bff5690..c39de18e3 100644
--- a/miner/miner.go
+++ b/miner/miner.go
@@ -29,7 +29,6 @@ import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/ethutil"
- "github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/chain"
"github.com/ethereum/go-ethereum/chain/types"
@@ -205,7 +204,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))
@@ -213,15 +212,10 @@ func (self *Miner) mine() {
nonce := self.pow.Search(block, self.powQuitCh)
if nonce != nil {
block.Nonce = nonce
- lchain := chain.NewChain(types.Blocks{block})
- _, err := chainMan.TestChain(lchain)
+ err := chainMan.InsertChain(types.Blocks{block})
if err != nil {
minerlogger.Infoln(err)
} else {
- chainMan.InsertChain(lchain, func(block *types.Block, _ state.Messages) {
- self.eth.EventMux().Post(chain.NewBlockEvent{block})
- })
-
self.eth.Broadcast(wire.MsgBlockTy, []interface{}{block.Value().Val})
minerlogger.Infof("🔨 Mined block %x\n", block.Hash())