cmd/geth: fix format

This commit is contained in:
Gary Rong 2024-03-20 20:49:22 +08:00
parent a8a162b625
commit 1f5da00f7b

View file

@ -224,7 +224,7 @@ WARNING: This is a low-level operation which may cause database corruption!`,
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "raw", Name: "raw",
Usage: "display the decoded raw state value", Usage: "display the decoded raw state value (otherwise shows rlp-encoded value)",
}, },
}, utils.NetworkFlags, utils.DatabaseFlags), }, utils.NetworkFlags, utils.DatabaseFlags),
Description: "This command queries the history of the account or storage slot within the specified block range", Description: "This command queries the history of the account or storage slot within the specified block range",
@ -808,11 +808,11 @@ func inspectAccount(db *triedb.Database, start uint64, end uint64, address commo
} }
code := "<nil>" code := "<nil>"
if len(account.CodeHash) > 0 { if len(account.CodeHash) > 0 {
code = fmt.Sprintf("%x", common.Bytes2Hex(account.CodeHash)) code = fmt.Sprintf("%x", account.CodeHash)
} }
root := "<nil>" root := "<nil>"
if len(account.Root) > 0 { if len(account.Root) > 0 {
root = fmt.Sprintf("%x", common.Bytes2Hex(account.Root)) root = fmt.Sprintf("%x", account.Root)
} }
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)
} }