diff --git a/crates/trie/trie/src/proof/mod.rs b/crates/trie/trie/src/proof/mod.rs index 867db6502..91262e0e1 100644 --- a/crates/trie/trie/src/proof/mod.rs +++ b/crates/trie/trie/src/proof/mod.rs @@ -332,7 +332,7 @@ where TrieElement::Leaf(hashed_slot, value) => { hash_builder.add_leaf( Nibbles::unpack(hashed_slot), - alloy_rlp::encode_fixed_size(&value).as_ref(), + alloy_rlp::encode_fixed_size(&value.value).as_ref(), value.is_private, ); } diff --git a/crates/trie/trie/src/test_utils.rs b/crates/trie/trie/src/test_utils.rs index 22eaa0872..c13a72dae 100644 --- a/crates/trie/trie/src/test_utils.rs +++ b/crates/trie/trie/src/test_utils.rs @@ -101,7 +101,7 @@ pub fn storage_root_privacy_aware< // Add each storage entry to the hash builder with privacy awareness for (hashed_key, flagged_storage) in storage_entries { let nibbles = Nibbles::unpack(hashed_key); - let encoded_value = encode_fixed_size(&flagged_storage); + let encoded_value = encode_fixed_size(&flagged_storage.value); hash_builder.add_leaf(nibbles, &encoded_value, flagged_storage.is_private()); } diff --git a/crates/trie/trie/src/trie.rs b/crates/trie/trie/src/trie.rs index 0541e38b1..4b700cfda 100644 --- a/crates/trie/trie/src/trie.rs +++ b/crates/trie/trie/src/trie.rs @@ -675,7 +675,7 @@ where hashed_entries_walked += 1; hash_builder.add_leaf( Nibbles::unpack(hashed_slot), - alloy_rlp::encode_fixed_size(&value).as_ref(), + alloy_rlp::encode_fixed_size(&value.value).as_ref(), value.is_private, ); diff --git a/crates/trie/trie/src/witness.rs b/crates/trie/trie/src/witness.rs index efbf27078..349159d6d 100644 --- a/crates/trie/trie/src/witness.rs +++ b/crates/trie/trie/src/witness.rs @@ -176,7 +176,7 @@ where storage.and_then(|s| s.storage.get(&hashed_slot)).filter(|v| !v.is_zero()); if let Some(value) = maybe_leaf_value { let is_private = value.is_private; - let value = alloy_rlp::encode_fixed_size(value).to_vec(); + let value = alloy_rlp::encode_fixed_size(&value.value).to_vec(); storage_trie .update_leaf(storage_nibbles, value, is_private, &provider) .map_err(|err| {