aboutsummaryrefslogtreecommitdiffstats
path: root/core/chain_manager.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-08 23:37:06 +0800
committerobscuren <geffobscura@gmail.com>2015-01-08 23:37:06 +0800
commitb25126a277da5253e4ce175dec5b68ccdf1b9b0f (patch)
treeea076157ad8304145228f2483ba3c955fa646120 /core/chain_manager.go
parentdb4aaedcbdb409e17ea3de161e7b24a80ba0a58c (diff)
downloaddexon-b25126a277da5253e4ce175dec5b68ccdf1b9b0f.tar.gz
dexon-b25126a277da5253e4ce175dec5b68ccdf1b9b0f.tar.zst
dexon-b25126a277da5253e4ce175dec5b68ccdf1b9b0f.zip
Minor fixed and additions for block proc
* Path check length * Genesis include TD * Output TD on last block
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r--core/chain_manager.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go
index 2d4001f0f..5ff3b88c9 100644
--- a/core/chain_manager.go
+++ b/core/chain_manager.go
@@ -139,7 +139,7 @@ func (bc *ChainManager) setLastBlock() {
bc.Reset()
}
- chainlogger.Infof("Last block (#%d) %x\n", bc.lastBlockNumber, bc.currentBlock.Hash())
+ chainlogger.Infof("Last block (#%d) %x TD=%v\n", bc.lastBlockNumber, bc.currentBlock.Hash(), bc.td)
}
// Block creation & chain handling
@@ -215,7 +215,7 @@ func (bc *ChainManager) insert(block *types.Block) {
func (bc *ChainManager) write(block *types.Block) {
bc.writeBlockInfo(block)
- encodedBlock := ethutil.Encode(block)
+ encodedBlock := ethutil.Encode(block.RlpDataForStorage())
bc.db.Put(block.Hash(), encodedBlock)
}