mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: always serialize zero balance (#4929)
This commit is contained in:
@ -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<Bytes>) -> 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(),
|
||||
|
||||
Reference in New Issue
Block a user