mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-17 12:21:38 +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.
|
// HasBAL verifies the existence of a block access list for a block.
|
||||||
func HasBAL(db ethdb.Reader, hash common.Hash, number uint64) bool {
|
func HasBAL(db ethdb.Reader, hash common.Hash, number uint64) bool {
|
||||||
if isCanon(db, number, hash) {
|
return len(ReadBALRLP(db, hash, number)) > 0
|
||||||
return true
|
|
||||||
}
|
|
||||||
if has, err := db.Has(balKey(number, hash)); !has || err != nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReadBALRLP retrieves the RLP-encoded block access list for a block.
|
// ReadBALRLP retrieves the RLP-encoded block access list for a block.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue