refactor(trie): avoid building prefix set for v2 storage proofs (#20898)

This commit is contained in:
GarmashAlex
2026-01-12 15:49:24 +03:00
committed by GitHub
parent 515fd597f3
commit 6fec4603cf

View File

@@ -115,8 +115,11 @@ impl ParallelProof {
target_slots: B256Set,
) -> Result<DecodedStorageMultiProof, ParallelStateRootError> {
let total_targets = target_slots.len();
let prefix_set = PrefixSetMut::from(target_slots.iter().map(Nibbles::unpack));
let prefix_set = prefix_set.freeze();
let prefix_set = if self.v2_proofs_enabled {
PrefixSet::default()
} else {
PrefixSetMut::from(target_slots.iter().map(Nibbles::unpack)).freeze()
};
trace!(
target: "trie::parallel_proof",