Merge pull request #278 from nguyenbatam/fix_err_externTd

fix error externTd
This commit is contained in:
Tuna 2018-11-12 14:48:22 +07:00 committed by GitHub
commit 4758613394
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 {