mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 09:51:36 +00:00
core/rawdb: fix HasBAL Pre-EIP-8189 canonical blocks have empty BAL entries in the freezer,
so can't rely on isCanon.
This commit is contained in:
parent
fbba18fc99
commit
8f4668cebb
1 changed files with 1 additions and 7 deletions
|
|
@ -608,13 +608,7 @@ func DeleteReceipts(db ethdb.KeyValueWriter, hash common.Hash, number uint64) {
|
|||
|
||||
// HasBAL verifies the existence of a block access list for a block.
|
||||
func HasBAL(db ethdb.Reader, hash common.Hash, number uint64) bool {
|
||||
if isCanon(db, number, hash) {
|
||||
return true
|
||||
}
|
||||
if has, err := db.Has(balKey(number, hash)); !has || err != nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return len(ReadBALRLP(db, hash, number)) > 0
|
||||
}
|
||||
|
||||
// ReadBALRLP retrieves the RLP-encoded block access list for a block.
|
||||
|
|
|
|||
Loading…
Reference in a new issue