From 529635f8d4d627d3652807e3f0377b3c256de4fc Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 6 Oct 2023 16:58:12 +0200 Subject: [PATCH] fix: always serialize zero balance (#4929) --- crates/rpc/rpc-types/src/eth/trace/geth/pre_state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rpc/rpc-types/src/eth/trace/geth/pre_state.rs b/crates/rpc/rpc-types/src/eth/trace/geth/pre_state.rs index c0cb3f37d1..5384896cbf 100644 --- a/crates/rpc/rpc-types/src/eth/trace/geth/pre_state.rs +++ b/crates/rpc/rpc-types/src/eth/trace/geth/pre_state.rs @@ -78,7 +78,7 @@ impl AccountState { /// If code is empty, it will be omitted. pub fn from_account_info(nonce: u64, balance: U256, code: Option) -> Self { Self { - balance: (balance != U256::ZERO).then_some(balance), + balance: Some(balance), code: code.filter(|code| !code.is_empty()), nonce: (nonce != 0).then_some(nonce), storage: Default::default(),