aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/block_manager.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-24 20:50:52 +0800
committerobscuren <geffobscura@gmail.com>2014-02-24 20:50:52 +0800
commit0afdedb01a8e4203129175dc9dcc213a55906a66 (patch)
treeb21889533c19f3a01d26bcde5bb30f55ba9c108d /ethchain/block_manager.go
parent6c7255cde2afdff7710af23c9830835398e6b43d (diff)
downloadgo-tangerine-0afdedb01a8e4203129175dc9dcc213a55906a66.tar
go-tangerine-0afdedb01a8e4203129175dc9dcc213a55906a66.tar.gz
go-tangerine-0afdedb01a8e4203129175dc9dcc213a55906a66.tar.bz2
go-tangerine-0afdedb01a8e4203129175dc9dcc213a55906a66.tar.lz
go-tangerine-0afdedb01a8e4203129175dc9dcc213a55906a66.tar.xz
go-tangerine-0afdedb01a8e4203129175dc9dcc213a55906a66.tar.zst
go-tangerine-0afdedb01a8e4203129175dc9dcc213a55906a66.zip
Some log statements changed to the default logger
Diffstat (limited to 'ethchain/block_manager.go')
-rw-r--r--ethchain/block_manager.go25
1 files changed, 4 insertions, 21 deletions
diff --git a/ethchain/block_manager.go b/ethchain/block_manager.go
index ad96f6a34..04036dbb1 100644
--- a/ethchain/block_manager.go
+++ b/ethchain/block_manager.go
@@ -165,37 +165,20 @@ func (bm *BlockManager) ProcessBlock(block *Block) error {
if bm.CalculateTD(block) {
// Sync the current block's state to the database and cancelling out the deferred Undo
bm.bc.CurrentBlock.Sync()
- // Add the block to the chain
- bm.bc.Add(block)
-
- /*
- ethutil.Config.Db.Put(block.Hash(), block.RlpEncode())
- bm.bc.CurrentBlock = block
- bm.LastBlockHash = block.Hash()
- bm.writeBlockInfo(block)
- */
-
- /*
- txs := bm.TransactionPool.Flush()
- var coded = []interface{}{}
- for _, tx := range txs {
- err := bm.TransactionPool.ValidateTransaction(tx)
- if err == nil {
- coded = append(coded, tx.RlpEncode())
- }
- }
- */
// Broadcast the valid block back to the wire
//bm.Speaker.Broadcast(ethwire.MsgBlockTy, []interface{}{block.Value().Val})
+ // Add the block to the chain
+ bm.bc.Add(block)
+
// If there's a block processor present, pass in the block for further
// processing
if bm.SecondaryBlockProcessor != nil {
bm.SecondaryBlockProcessor.ProcessBlock(block)
}
- log.Printf("[BMGR] Added block #%d (%x)\n", block.BlockInfo().Number, block.Hash())
+ ethutil.Config.Log.Infof("[BMGR] Added block #%d (%x)\n", block.BlockInfo().Number, block.Hash())
} else {
fmt.Println("total diff failed")
}