triedb: hash as key, not address

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
jsvisa 2025-07-01 23:57:37 +08:00
parent 8e4430bb77
commit 40cb2543c2

View file

@ -73,8 +73,8 @@ func storeIndexMetadata(db ethdb.KeyValueWriter, last uint64) {
// batchIndexer is a structure designed to perform batch indexing or unindexing // batchIndexer is a structure designed to perform batch indexing or unindexing
// of state histories atomically. // of state histories atomically.
type batchIndexer struct { type batchIndexer struct {
accounts map[common.Hash][]uint64 // History ID list, Keyed by account address accounts map[common.Hash][]uint64 // History ID list, Keyed by the hash of account address
storages map[common.Hash]map[common.Hash][]uint64 // History ID list, Keyed by account address and the hash of raw storage key storages map[common.Hash]map[common.Hash][]uint64 // History ID list, Keyed by the hash of account address and the hash of raw storage key
counter int // The counter of processed states counter int // The counter of processed states
delete bool // Index or unindex mode delete bool // Index or unindex mode
lastID uint64 // The ID of latest processed history lastID uint64 // The ID of latest processed history