mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
Merge pull request #278 from nguyenbatam/fix_err_externTd
fix error externTd
This commit is contained in:
commit
4758613394
1 changed files with 1 additions and 1 deletions
|
|
@ -893,7 +893,7 @@ func (bc *BlockChain) WriteBlockWithState(block *types.Block, receipts []*types.
|
||||||
|
|
||||||
currentBlock := bc.CurrentBlock()
|
currentBlock := bc.CurrentBlock()
|
||||||
//localTd := bc.GetTd(currentBlock.Hash(), currentBlock.NumberU64())
|
//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
|
// Irrelevant of the canonical status, write the block itself to the database
|
||||||
if err := bc.hc.WriteTd(block.Hash(), block.NumberU64(), externTd); err != nil {
|
if err := bc.hc.WriteTd(block.Hash(), block.NumberU64(), externTd); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue