From 398df94c3e8e95aa8fbd617d8919514ed33eb8f7 Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Tue, 17 Sep 2024 16:28:24 +0200 Subject: [PATCH] chore: remove children hashes methods --- src/nodes/branch.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/nodes/branch.rs b/src/nodes/branch.rs index f4e648e..26c1f67 100644 --- a/src/nodes/branch.rs +++ b/src/nodes/branch.rs @@ -2,7 +2,6 @@ use super::{super::TrieMask, rlp_node, CHILD_INDEX_RANGE}; use alloy_primitives::{hex, B256}; use alloy_rlp::{length_of_length, Buf, BufMut, Decodable, Encodable, Header, EMPTY_STRING_CODE}; use core::{fmt, ops::Range, slice::Iter}; -use nybbles::Nibbles; #[allow(unused_imports)] use alloc::vec::Vec; @@ -164,21 +163,6 @@ impl<'a> BranchNodeRef<'a> { .map(|(_, child)| B256::from_slice(&child[1..])) } - /// Return an iterator over stack items and corresponding indices that match the state mask. - pub fn indexed_children(&self) -> impl Iterator + '_ { - BranchChildrenIter::new(self).map(|(index, child)| (index, B256::from_slice(&child[1..]))) - } - - /// Given the prefix, return an iterator over stack items that match the - /// state mask and their corresponding full paths. - pub fn prefixed_children(&self, prefix: Nibbles) -> impl Iterator + '_ { - self.indexed_children().map(move |(index, hash)| { - let mut path = prefix.clone(); - path.push(index); - (path, hash) - }) - } - /// Returns the RLP encoding of the branch node given the state mask of children present. pub fn rlp(&self, out: &mut Vec) -> Vec { self.encode(out);