refactor(trie): trie node iterators (#5048)

This commit is contained in:
Roman Krasiuk
2023-10-18 04:13:01 -07:00
committed by GitHub
parent 9d9de58057
commit 4b1a0ce174
14 changed files with 412 additions and 279 deletions

View File

@ -17,6 +17,7 @@ pub struct MerkleCheckpoint {
pub target_block: BlockNumber,
/// The last hashed account key processed.
pub last_account_key: B256,
// TODO: remove in the next breaking release.
/// The last walker key processed.
pub last_walker_key: Vec<u8>,
/// Previously recorded walker stack.
@ -30,11 +31,16 @@ impl MerkleCheckpoint {
pub fn new(
target_block: BlockNumber,
last_account_key: B256,
last_walker_key: Vec<u8>,
walker_stack: Vec<StoredSubNode>,
state: HashBuilderState,
) -> Self {
Self { target_block, last_account_key, last_walker_key, walker_stack, state }
Self {
target_block,
last_account_key,
walker_stack,
state,
last_walker_key: Vec::default(),
}
}
}