diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-19 23:59:13 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-19 23:59:13 +0800 |
commit | b5a71d955cacec0c8f81fbcf36b6f3d6d60b4bb1 (patch) | |
tree | 9d94b69006029e91d7cdf2d0eb9d6d457d238671 /core/chain_manager.go | |
parent | ce063e8d9c2d26dd283a43b097903628225179ea (diff) | |
parent | e540a75030de611ca8cf0a70621421b6aa3fbebf (diff) | |
download | go-tangerine-b5a71d955cacec0c8f81fbcf36b6f3d6d60b4bb1.tar go-tangerine-b5a71d955cacec0c8f81fbcf36b6f3d6d60b4bb1.tar.gz go-tangerine-b5a71d955cacec0c8f81fbcf36b6f3d6d60b4bb1.tar.bz2 go-tangerine-b5a71d955cacec0c8f81fbcf36b6f3d6d60b4bb1.tar.lz go-tangerine-b5a71d955cacec0c8f81fbcf36b6f3d6d60b4bb1.tar.xz go-tangerine-b5a71d955cacec0c8f81fbcf36b6f3d6d60b4bb1.tar.zst go-tangerine-b5a71d955cacec0c8f81fbcf36b6f3d6d60b4bb1.zip |
merge
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r-- | core/chain_manager.go | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index 4bf9e9aed..ff37ea28a 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -410,7 +410,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 @@ -438,29 +438,27 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { hash := block.Hash() chainlogger.Infof("Split detected. New head #%v (%x) TD=%v, was #%v (%x) TD=%v\n", block.Header().Number, hash[:4], td, cblock.Header().Number, chash[:4], self.td) - queue[i] = ChainSplitEvent{block} + queue[i] = ChainSplitEvent{block, logs} queueEvent.splitCount++ } self.setTotalDifficulty(td) self.insert(block) - /* XXX crashes jsonlogger.LogJson(&logger.EthChainNewHead{ - BlockHash: common.Bytes2Hex(block.Hash()), + BlockHash: block.Hash().Hex(), BlockNumber: block.Number(), - ChainHeadHash: common.Bytes2Hex(cblock.Hash()), - BlockPrevHash: common.Bytes2Hex(block.ParentHash()), + ChainHeadHash: cblock.Hash().Hex(), + BlockPrevHash: block.ParentHash().Hex(), }) - */ 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++ } } |