Skip to content

Commit

Permalink
fix account trie nodes type
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimenez committed Nov 18, 2024
1 parent c468507 commit d4dd8ce
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/trie/trie/src/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use alloy_primitives::{
};
use alloy_rlp::{BufMut, Decodable, Encodable};
use itertools::{Either, Itertools};
use rayon::prelude::*;
use reth_execution_errors::{StateProofError, TrieWitnessError};
use reth_trie_common::{
BranchNode, HashBuilder, Nibbles, StorageMultiProof, TrieAccount, TrieNode, CHILD_INDEX_RANGE,
Expand Down Expand Up @@ -99,7 +98,7 @@ where
// Attempt to compute state root from proofs and gather additional
// information for the witness.
let mut account_rlp = Vec::with_capacity(128);
let mut account_trie_nodes = Vec::new();
let mut account_trie_nodes = BTreeMap::default();
for (hashed_address, hashed_slots) in proof_targets {
let storage_multiproof = account_multiproof
.storages
Expand Down Expand Up @@ -149,7 +148,7 @@ where
)?);
}

next_root_from_proofs(storage_trie_nodes, false, |key: Nibbles| {
next_root_from_proofs(storage_trie_nodes, |key: Nibbles| {
// Right pad the target with 0s.
let mut padded_key = key.pack();
padded_key.resize(32, 0);
Expand All @@ -176,7 +175,7 @@ where
})?;
}

next_root_from_proofs(account_trie_nodes, false, |key: Nibbles| {
next_root_from_proofs(account_trie_nodes, |key: Nibbles| {
// Right pad the target with 0s.
let mut padded_key = key.pack();
padded_key.resize(32, 0);
Expand Down

0 comments on commit d4dd8ce

Please sign in to comment.