mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 00:58:11 -05:00
chore(trie): rename cursor module (#2333)
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
mod account_cursor;
|
||||
mod storage_cursor;
|
||||
mod subnode;
|
||||
mod trie_cursor;
|
||||
|
||||
pub use self::{
|
||||
account_cursor::AccountTrieCursor, storage_cursor::StorageTrieCursor, subnode::CursorSubNode,
|
||||
trie_cursor::TrieCursor,
|
||||
};
|
||||
@@ -26,7 +26,7 @@ pub mod hash_builder;
|
||||
pub mod prefix_set;
|
||||
|
||||
/// The cursor implementations for navigating account and storage tries.
|
||||
pub mod cursor;
|
||||
pub mod trie_cursor;
|
||||
|
||||
/// The trie walker for iterating over the trie nodes.
|
||||
pub mod walker;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::{cursor::CursorSubNode, hash_builder::HashBuilder, updates::TrieUpdates, Nibbles};
|
||||
use crate::{hash_builder::HashBuilder, trie_cursor::CursorSubNode, updates::TrieUpdates, Nibbles};
|
||||
use reth_primitives::{trie::StoredSubNode, MerkleCheckpoint, H256};
|
||||
|
||||
/// The progress of the state root computation.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use crate::{
|
||||
account::EthAccount,
|
||||
cursor::{AccountTrieCursor, StorageTrieCursor},
|
||||
hash_builder::HashBuilder,
|
||||
nibbles::Nibbles,
|
||||
prefix_set::{PrefixSet, PrefixSetLoader},
|
||||
progress::{IntermediateStateRootState, StateRootProgress},
|
||||
trie_cursor::{AccountTrieCursor, StorageTrieCursor},
|
||||
updates::{TrieKey, TrieOp, TrieUpdates},
|
||||
walker::TrieWalker,
|
||||
StateRootError, StorageRootError,
|
||||
|
||||
@@ -2,6 +2,14 @@ use crate::updates::TrieKey;
|
||||
use reth_db::{table::Key, Error};
|
||||
use reth_primitives::trie::BranchNodeCompact;
|
||||
|
||||
mod account_cursor;
|
||||
mod storage_cursor;
|
||||
mod subnode;
|
||||
|
||||
pub use self::{
|
||||
account_cursor::AccountTrieCursor, storage_cursor::StorageTrieCursor, subnode::CursorSubNode,
|
||||
};
|
||||
|
||||
/// A cursor for navigating a trie that works with both Tables and DupSort tables.
|
||||
pub trait TrieCursor<K: Key> {
|
||||
/// Move the cursor to the key and return if it is an exact match.
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
cursor::{CursorSubNode, TrieCursor},
|
||||
prefix_set::PrefixSet,
|
||||
trie_cursor::{CursorSubNode, TrieCursor},
|
||||
updates::TrieUpdates,
|
||||
Nibbles,
|
||||
};
|
||||
@@ -252,7 +252,7 @@ impl<'a, K: Key + From<Vec<u8>>, C: TrieCursor<K>> TrieWalker<'a, K, C> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::cursor::{AccountTrieCursor, StorageTrieCursor};
|
||||
use crate::trie_cursor::{AccountTrieCursor, StorageTrieCursor};
|
||||
use reth_db::{
|
||||
cursor::DbCursorRW, mdbx::test_utils::create_test_rw_db, tables, transaction::DbTxMut,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user