diff --git a/crates/primitives-traits/src/account.rs b/crates/primitives-traits/src/account.rs index c3a54b102c..5ad4e59404 100644 --- a/crates/primitives-traits/src/account.rs +++ b/crates/primitives-traits/src/account.rs @@ -91,7 +91,11 @@ impl From for Account { impl From for Account { fn from(value: TrieAccount) -> Self { - Self { balance: value.balance, nonce: value.nonce, bytecode_hash: Some(value.code_hash) } + Self { + balance: value.balance, + nonce: value.nonce, + bytecode_hash: (value.code_hash != KECCAK_EMPTY).then_some(value.code_hash), + } } }