diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-19 23:19:54 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-19 23:19:54 +0800 |
commit | 14a2f42f3700640f191e0095b50a266d2a919b38 (patch) | |
tree | e22528f68c7bdab57a8cdfbcddc29df06c15457a /core/chain_manager.go | |
parent | b52807f0c0ff1b89cc1d7172ce1b768a34d02b00 (diff) | |
download | dexon-14a2f42f3700640f191e0095b50a266d2a919b38.tar dexon-14a2f42f3700640f191e0095b50a266d2a919b38.tar.gz dexon-14a2f42f3700640f191e0095b50a266d2a919b38.tar.bz2 dexon-14a2f42f3700640f191e0095b50a266d2a919b38.tar.lz dexon-14a2f42f3700640f191e0095b50a266d2a919b38.tar.xz dexon-14a2f42f3700640f191e0095b50a266d2a919b38.tar.zst dexon-14a2f42f3700640f191e0095b50a266d2a919b38.zip |
fixed chain event. Closes #529
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r-- | core/chain_manager.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index ff91b0427..88518e62b 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -6,8 +6,8 @@ import ( "math/big" "sync" - "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/rlp" @@ -411,7 +411,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { for i, block := range chain { // Call in to the block processor and check for errors. It's likely that if one block fails // all others will fail too (unless a known block is returned). - td, err := self.processor.Process(block) + td, logs, err := self.processor.Process(block) if err != nil { if IsKnownBlockErr(err) { continue @@ -437,7 +437,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { if block.Header().Number.Cmp(new(big.Int).Add(cblock.Header().Number, common.Big1)) < 0 { chainlogger.Infof("Split detected. New head #%v (%x) TD=%v, was #%v (%x) TD=%v\n", block.Header().Number, block.Hash()[:4], td, cblock.Header().Number, cblock.Hash()[:4], self.td) - queue[i] = ChainSplitEvent{block} + queue[i] = ChainSplitEvent{block, logs} queueEvent.splitCount++ } @@ -456,10 +456,10 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { self.setTransState(state.New(block.Root(), self.stateDb)) self.setTxState(state.New(block.Root(), self.stateDb)) - queue[i] = ChainEvent{block} + queue[i] = ChainEvent{block, logs} queueEvent.canonicalCount++ } else { - queue[i] = ChainSideEvent{block} + queue[i] = ChainSideEvent{block, logs} queueEvent.sideCount++ } } |