cmd, triedb/pathdb: fix comment

This commit is contained in:
Gary Rong 2024-03-15 19:49:22 +08:00
parent 7e02fb20e4
commit 6eff5e2eef
3 changed files with 5 additions and 5 deletions

View file

@ -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])
}

View file

@ -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) {

View file

@ -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
}