|
|
@ -139,7 +139,7 @@ func (bc *ChainManager) setLastBlock() { |
|
|
|
bc.Reset() |
|
|
|
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
|
|
|
|
// Block creation & chain handling
|
|
|
@ -215,7 +215,7 @@ func (bc *ChainManager) insert(block *types.Block) { |
|
|
|
func (bc *ChainManager) write(block *types.Block) { |
|
|
|
func (bc *ChainManager) write(block *types.Block) { |
|
|
|
bc.writeBlockInfo(block) |
|
|
|
bc.writeBlockInfo(block) |
|
|
|
|
|
|
|
|
|
|
|
encodedBlock := ethutil.Encode(block) |
|
|
|
encodedBlock := ethutil.Encode(block.RlpDataForStorage()) |
|
|
|
bc.db.Put(block.Hash(), encodedBlock) |
|
|
|
bc.db.Put(block.Hash(), encodedBlock) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|