aboutsummaryrefslogtreecommitdiffstats
path: root/chain/block_manager.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-02 19:23:27 +0800
committerobscuren <geffobscura@gmail.com>2014-12-02 19:23:27 +0800
commit5ebae82eeb3f5ecdffb96f9d692523d0b0d4f759 (patch)
treeb51f867420e4953b5ee540d966e312f89324d626 /chain/block_manager.go
parent99481a245adc2c4814ab6b38d94d63114f7bbb15 (diff)
downloaddexon-5ebae82eeb3f5ecdffb96f9d692523d0b0d4f759.tar.gz
dexon-5ebae82eeb3f5ecdffb96f9d692523d0b0d4f759.tar.zst
dexon-5ebae82eeb3f5ecdffb96f9d692523d0b0d4f759.zip
Additional logging and removed temp merged mining options.
Diffstat (limited to 'chain/block_manager.go')
-rw-r--r--chain/block_manager.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/chain/block_manager.go b/chain/block_manager.go
index c1a28e423..9133475b6 100644
--- a/chain/block_manager.go
+++ b/chain/block_manager.go
@@ -185,8 +185,7 @@ func (sm *BlockManager) Process(block *Block) (td *big.Int, msgs state.Messages,
defer sm.mutex.Unlock()
if sm.bc.HasBlock(block.Hash()) {
- fmt.Println("already having this block")
- return nil, nil, nil
+ return nil, nil, &KnownBlockError{block.Number, block.Hash()}
}
if !sm.bc.HasBlock(block.PrevHash) {
@@ -233,12 +232,10 @@ func (sm *BlockManager) ProcessWithParent(block, parent *Block) (td *big.Int, me
// Block validation
if err = sm.ValidateBlock(block, parent); err != nil {
- statelogger.Errorln("validating block:", err)
return
}
if err = sm.AccumelateRewards(state, block, parent); err != nil {
- statelogger.Errorln("accumulating reward", err)
return
}
@@ -271,7 +268,6 @@ func (sm *BlockManager) ProcessWithParent(block, parent *Block) (td *big.Int, me
sm.transState = state.Copy()
sm.eth.TxPool().RemoveSet(block.Transactions())
- fmt.Println("TD", td)
return td, messages, nil
} else {