Skip to content

Commit

Permalink
rpcdaemon: fix balance and nonce dumps in debug_accountAt (#1734)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sixtysixter authored Jan 5, 2024
1 parent f0cfe21 commit 4c9ab64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions silkworm/rpc/commands/debug_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ Task<void> DebugRpcApi::handle_debug_account_at(const nlohmann::json& request, n
nlohmann::json json_result;
if (ibs.exists(address)) {
std::ostringstream oss;
oss << ibs.get_nonce(address);
oss << std::hex << ibs.get_nonce(address);
json_result["nonce"] = "0x" + oss.str();
json_result["balance"] = "0x" + intx::to_string(ibs.get_balance(address));
json_result["balance"] = "0x" + intx::to_string(ibs.get_balance(address), 16);
json_result["codeHash"] = ibs.get_code_hash(address);
json_result["code"] = "0x" + silkworm::to_hex(ibs.get_code(address));
} else {
Expand Down

0 comments on commit 4c9ab64

Please sign in to comment.