From 6eff5e2eefca359b0d43d5799a20de07e7d5d0c7 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Fri, 15 Mar 2024 19:49:22 +0800 Subject: [PATCH] cmd, triedb/pathdb: fix comment --- cmd/geth/dbcmd.go | 2 +- triedb/pathdb/database.go | 4 ++-- triedb/pathdb/history_inspect.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/geth/dbcmd.go b/cmd/geth/dbcmd.go index e0e14c5a1b..5a69353bdd 100644 --- a/cmd/geth/dbcmd.go +++ b/cmd/geth/dbcmd.go @@ -861,7 +861,7 @@ func inspectHistory(ctx *cli.Context) error { } else { fmt.Printf("Storage history: %s-%s\n", address.Hex(), slot.Hex()) } - fmt.Printf("Range: [#%d-#%d]\n", stats.Start, stats.End) + fmt.Printf("Range: [#%d-#%d]\n\n", stats.Start, stats.End) for i := 0; i < len(stats.Blocks); i++ { fmt.Printf("#%d: %x\n", stats.Blocks[i], stats.Origins[i]) } diff --git a/triedb/pathdb/database.go b/triedb/pathdb/database.go index 13fb52619b..e6afb72e30 100644 --- a/triedb/pathdb/database.go +++ b/triedb/pathdb/database.go @@ -492,7 +492,7 @@ func (db *Database) modifyAllowed() error { // available object is selected as the starting point. // // End: State ID of the last history for the query. 0 implies the last available -// object is selected as the starting point. Note end is included for query. +// object is selected as the ending point. Note end is included in the query. func (db *Database) AccountHistory(address common.Address, start, end uint64) (*HistoryStats, error) { return accountHistory(db.freezer, address, start, end) } @@ -503,7 +503,7 @@ func (db *Database) AccountHistory(address common.Address, start, end uint64) (* // available object is selected as the starting point. // // End: State ID of the last history for the query. 0 implies the last available -// object is selected as the starting point. Note end is included for query. +// object is selected as the ending point. Note end is included in the query. // // Note, slot refers to the hash of the raw slot key. func (db *Database) StorageHistory(address common.Address, slot common.Hash, start uint64, end uint64) (*HistoryStats, error) { diff --git a/triedb/pathdb/history_inspect.go b/triedb/pathdb/history_inspect.go index 688eb193a7..bcb7ebc563 100644 --- a/triedb/pathdb/history_inspect.go +++ b/triedb/pathdb/history_inspect.go @@ -27,8 +27,8 @@ import ( // HistoryStats wraps the history inspection statistics. type HistoryStats struct { - Start uint64 // Block number of first queried history - End uint64 // Block number of last queried history + Start uint64 // Block number of the first queried history + End uint64 // Block number of the last queried history Blocks []uint64 // Blocks refers to the list of block numbers in which the state is mutated Origins [][]byte // Origins refers to the original value of the state before its mutation }