Skip to content

Commit

Permalink
fix error externTd
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenbatam committed Nov 12, 2018
1 parent edf91f5 commit 2e53774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2e53774

Please sign in to comment.