Skip to content

Commit 62a17fd

Browse files
authored
core/rawdb, triedb/pathdb: fix two inaccurate comments (#32130)
1 parent fe7a77a commit 62a17fd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/rawdb/schema.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ var (
125125
StateHistoryIndexPrefix = []byte("m") // The global prefix of state history index data
126126
StateHistoryAccountMetadataPrefix = []byte("ma") // StateHistoryAccountMetadataPrefix + account address hash => account metadata
127127
StateHistoryStorageMetadataPrefix = []byte("ms") // StateHistoryStorageMetadataPrefix + account address hash + storage slot hash => slot metadata
128-
StateHistoryAccountBlockPrefix = []byte("mba") // StateHistoryAccountBlockPrefix + account address hash + block_number => account block
129-
StateHistoryStorageBlockPrefix = []byte("mbs") // StateHistoryStorageBlockPrefix + account address hash + storage slot hash + block_number => slot block
128+
StateHistoryAccountBlockPrefix = []byte("mba") // StateHistoryAccountBlockPrefix + account address hash + blockID => account block
129+
StateHistoryStorageBlockPrefix = []byte("mbs") // StateHistoryStorageBlockPrefix + account address hash + storage slot hash + blockID => slot block
130130

131131
// VerklePrefix is the database prefix for Verkle trie data, which includes:
132132
// (a) Trie nodes

triedb/pathdb/history_indexer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ func storeIndexMetadata(db ethdb.KeyValueWriter, last uint64) {
7373
// batchIndexer is a structure designed to perform batch indexing or unindexing
7474
// of state histories atomically.
7575
type batchIndexer struct {
76-
accounts map[common.Hash][]uint64 // History ID list, Keyed by account address
77-
storages map[common.Hash]map[common.Hash][]uint64 // History ID list, Keyed by account address and the hash of raw storage key
76+
accounts map[common.Hash][]uint64 // History ID list, Keyed by the hash of account address
77+
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
7878
counter int // The counter of processed states
7979
delete bool // Index or unindex mode
8080
lastID uint64 // The ID of latest processed history

0 commit comments

Comments
 (0)