From bf2071f77373cd1a61c84e8e20a306e3d7b3ae30 Mon Sep 17 00:00:00 2001 From: James Niken <155266991+dizer-ti@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:02:56 +0100 Subject: [PATCH] fix(primitives-traits): handle KECCAK_EMPTY in From (#22200) --- crates/primitives-traits/src/account.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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), + } } }