cmd/geth: fix output

This commit is contained in:
Gary Rong 2024-03-20 21:05:04 +08:00
parent 1f5da00f7b
commit 9deda7ff72

View file

@ -817,7 +817,7 @@ func inspectAccount(db *triedb.Database, start uint64, end uint64, address commo
content = fmt.Sprintf("nonce: %d, balance: %d, code: %s, root: %s", account.Nonce, account.Balance, code, root) content = fmt.Sprintf("nonce: %d, balance: %d, code: %s, root: %s", account.Nonce, account.Balance, code, root)
} }
} }
fmt.Printf("#%d - #%d: %s\n", from, stats.Blocks[i]-1, content) fmt.Printf("#%d - #%d: %s\n", from, stats.Blocks[i], content)
from = stats.Blocks[i] from = stats.Blocks[i]
} }
return nil return nil
@ -850,7 +850,7 @@ func inspectStorage(db *triedb.Database, start uint64, end uint64, address commo
content = fmt.Sprintf("#%x", data) content = fmt.Sprintf("#%x", data)
} }
} }
fmt.Printf("#%d - #%d: %s\n", from, stats.Blocks[i]-1, content) fmt.Printf("#%d - #%d: %s\n", from, stats.Blocks[i], content)
from = stats.Blocks[i] from = stats.Blocks[i]
} }
return nil return nil