From 8f4668cebb99dc8d9d72a8326dfe102b1059f485 Mon Sep 17 00:00:00 2001 From: jonny rhea <5555162+jrhea@users.noreply.github.com> Date: Fri, 20 Mar 2026 14:20:36 -0500 Subject: [PATCH] core/rawdb: fix HasBAL Pre-EIP-8189 canonical blocks have empty BAL entries in the freezer, so can't rely on isCanon. --- core/rawdb/accessors_chain.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go index 7f042f4a8f..bf6b8aaf80 100644 --- a/core/rawdb/accessors_chain.go +++ b/core/rawdb/accessors_chain.go @@ -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.