Commit 629b5837 authored by Péter Szilágyi's avatar Péter Szilágyi Committed by Felix Lange

core: revert invalid block dedup code (#15235)

parent c2d93ded
...@@ -796,11 +796,6 @@ func (bc *BlockChain) WriteBlockAndState(block *types.Block, receipts []*types.R ...@@ -796,11 +796,6 @@ func (bc *BlockChain) WriteBlockAndState(block *types.Block, receipts []*types.R
bc.mu.Lock() bc.mu.Lock()
defer bc.mu.Unlock() defer bc.mu.Unlock()
if bc.HasBlock(block.Hash(), block.NumberU64()) {
log.Trace("Block existed", "hash", block.Hash())
return
}
localTd := bc.GetTd(bc.currentBlock.Hash(), bc.currentBlock.NumberU64()) localTd := bc.GetTd(bc.currentBlock.Hash(), bc.currentBlock.NumberU64())
externTd := new(big.Int).Add(block.Difficulty(), ptd) externTd := new(big.Int).Add(block.Difficulty(), ptd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment