forked from cerc-io/plugeth
core, eth/downloader: handle spurious junk bodies from racey rollbacks (#25578)
* eth/downloader: handle junkbodies/receipts in the beacon sync * core: check for header presence when checking for blocks
This commit is contained in:
@@ -137,6 +137,9 @@ func (bc *BlockChain) HasBlock(hash common.Hash, number uint64) bool {
|
||||
if bc.blockCache.Contains(hash) {
|
||||
return true
|
||||
}
|
||||
if !bc.HasHeader(hash, number) {
|
||||
return false
|
||||
}
|
||||
return rawdb.HasBody(bc.db, hash, number)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user