diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go index b2157bb695..c986aa99ac 100644 --- a/core/rawdb/accessors_chain.go +++ b/core/rawdb/accessors_chain.go @@ -613,7 +613,7 @@ func HasAccessList(db ethdb.Reader, hash common.Hash, number uint64) bool { // ReadAccessListRLP retrieves the RLP-encoded block access list for a block from KV. func ReadAccessListRLP(db ethdb.Reader, hash common.Hash, number uint64) rlp.RawValue { - data, _ := db.Get(balKey(number, hash)) + data, _ := db.Get(accessListKey(number, hash)) return data } @@ -642,14 +642,14 @@ func WriteAccessList(db ethdb.KeyValueWriter, hash common.Hash, number uint64, b // WriteAccessListRLP stores a pre-encoded block access list in the active KV store. func WriteAccessListRLP(db ethdb.KeyValueWriter, hash common.Hash, number uint64, encoded rlp.RawValue) { - if err := db.Put(balKey(number, hash), encoded); err != nil { + if err := db.Put(accessListKey(number, hash), encoded); err != nil { log.Crit("Failed to store BAL", "err", err) } } // DeleteAccessList removes a block access list from the active KV store. func DeleteAccessList(db ethdb.KeyValueWriter, hash common.Hash, number uint64) { - if err := db.Delete(balKey(number, hash)); err != nil { + if err := db.Delete(accessListKey(number, hash)); err != nil { log.Crit("Failed to delete BAL", "err", err) } } diff --git a/core/rawdb/schema.go b/core/rawdb/schema.go index 6aa07220d4..54c76143b4 100644 --- a/core/rawdb/schema.go +++ b/core/rawdb/schema.go @@ -112,7 +112,7 @@ var ( blockBodyPrefix = []byte("b") // blockBodyPrefix + num (uint64 big endian) + hash -> block body blockReceiptsPrefix = []byte("r") // blockReceiptsPrefix + num (uint64 big endian) + hash -> block receipts - balPrefix = []byte("j") // balPrefix + num (uint64 big endian) + hash -> block access list + accessListPrefix = []byte("j") // accessListPrefix + num (uint64 big endian) + hash -> block access list txLookupPrefix = []byte("l") // txLookupPrefix + hash -> transaction/receipt lookup metadata bloomBitsPrefix = []byte("B") // bloomBitsPrefix + bit (uint16 big endian) + section (uint64 big endian) + hash -> bloom bits @@ -215,9 +215,9 @@ func blockReceiptsKey(number uint64, hash common.Hash) []byte { return append(append(blockReceiptsPrefix, encodeBlockNumber(number)...), hash.Bytes()...) } -// balKey = balPrefix + num (uint64 big endian) + hash -func balKey(number uint64, hash common.Hash) []byte { - return append(append(balPrefix, encodeBlockNumber(number)...), hash.Bytes()...) +// accessListKey = accessListPrefix + num (uint64 big endian) + hash +func accessListKey(number uint64, hash common.Hash) []byte { + return append(append(accessListPrefix, encodeBlockNumber(number)...), hash.Bytes()...) } // txLookupKey = txLookupPrefix + hash