reth_trie::witness

Function target_nodes

Source
pub fn target_nodes<'b>(
    key: Nibbles,
    value: Option<Vec<u8>>,
    witness: Option<&mut HashMap<B256, Bytes>>,
    proof: impl IntoIterator<Item = (&'b Nibbles, &'b Bytes)>,
) -> Result<BTreeMap<Nibbles, Either<B256, Vec<u8>>>, TrieWitnessError>
Expand description

Decodes and unrolls all nodes from the proof. Returns only sibling nodes in the path of the target and the final leaf node with updated value.