fix(primitives-traits): handle KECCAK_EMPTY in From<TrieAccount> (#22200)

This commit is contained in:
James Niken
2026-02-16 11:02:56 +01:00
committed by GitHub
parent ee5ec069cd
commit bf2071f773

View File

@@ -91,7 +91,11 @@ impl From<revm_state::Account> for Account {
impl From<TrieAccount> 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),
}
}
}