fix error externTd

This commit is contained in:
Nguyen Ba Tam 2018-11-12 14:45:54 +07:00
parent edf91f5d50
commit 2e53774f67

View file

@ -893,7 +893,7 @@ func (bc *BlockChain) WriteBlockWithState(block *types.Block, receipts []*types.
currentBlock := bc.CurrentBlock()
//localTd := bc.GetTd(currentBlock.Hash(), currentBlock.NumberU64())
//externTd := new(big.Int).Add(block.Difficulty(), ptd)
externTd := new(big.Int).Add(block.Difficulty(), ptd)
// Irrelevant of the canonical status, write the block itself to the database
if err := bc.hc.WriteTd(block.Hash(), block.NumberU64(), externTd); err != nil {