From 62a17fdb254618844591f7138f75227ec88ce0fe Mon Sep 17 00:00:00 2001 From: Delweng Date: Wed, 2 Jul 2025 08:46:03 +0800 Subject: [PATCH] core/rawdb, triedb/pathdb: fix two inaccurate comments (#32130) --- core/rawdb/schema.go | 4 ++-- triedb/pathdb/history_indexer.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/rawdb/schema.go b/core/rawdb/schema.go index eec25a8042..388a08f243 100644 --- a/core/rawdb/schema.go +++ b/core/rawdb/schema.go @@ -125,8 +125,8 @@ var ( StateHistoryIndexPrefix = []byte("m") // The global prefix of state history index data StateHistoryAccountMetadataPrefix = []byte("ma") // StateHistoryAccountMetadataPrefix + account address hash => account metadata StateHistoryStorageMetadataPrefix = []byte("ms") // StateHistoryStorageMetadataPrefix + account address hash + storage slot hash => slot metadata - StateHistoryAccountBlockPrefix = []byte("mba") // StateHistoryAccountBlockPrefix + account address hash + block_number => account block - StateHistoryStorageBlockPrefix = []byte("mbs") // StateHistoryStorageBlockPrefix + account address hash + storage slot hash + block_number => slot block + StateHistoryAccountBlockPrefix = []byte("mba") // StateHistoryAccountBlockPrefix + account address hash + blockID => account block + StateHistoryStorageBlockPrefix = []byte("mbs") // StateHistoryStorageBlockPrefix + account address hash + storage slot hash + blockID => slot block // VerklePrefix is the database prefix for Verkle trie data, which includes: // (a) Trie nodes diff --git a/triedb/pathdb/history_indexer.go b/triedb/pathdb/history_indexer.go index 90816e6ef6..42103fab32 100644 --- a/triedb/pathdb/history_indexer.go +++ b/triedb/pathdb/history_indexer.go @@ -73,8 +73,8 @@ func storeIndexMetadata(db ethdb.KeyValueWriter, last uint64) { // batchIndexer is a structure designed to perform batch indexing or unindexing // of state histories atomically. type batchIndexer struct { - accounts map[common.Hash][]uint64 // History ID list, Keyed by account address - storages map[common.Hash]map[common.Hash][]uint64 // History ID list, Keyed by account address and the hash of raw storage key + 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 the hash of account address and the hash of raw storage key counter int // The counter of processed states delete bool // Index or unindex mode lastID uint64 // The ID of latest processed history