mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(trie): move PrefixSetLoader to db crate (#9985)
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
//! An integration of [`reth-trie`] with [`reth-db`].
|
||||
|
||||
mod prefix_set;
|
||||
mod proof;
|
||||
mod state;
|
||||
mod storage;
|
||||
mod witness;
|
||||
|
||||
pub use prefix_set::PrefixSetLoader;
|
||||
pub use proof::DatabaseProof;
|
||||
pub use state::DatabaseStateRoot;
|
||||
pub use storage::DatabaseStorageRoot;
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
use super::{PrefixSetMut, TriePrefixSets};
|
||||
use crate::Nibbles;
|
||||
use derive_more::Deref;
|
||||
use reth_db::tables;
|
||||
use reth_db_api::{
|
||||
@ -9,10 +7,13 @@ use reth_db_api::{
|
||||
DatabaseError,
|
||||
};
|
||||
use reth_primitives::{keccak256, BlockNumber, StorageEntry, B256};
|
||||
use reth_trie::prefix_set::{PrefixSetMut, TriePrefixSets};
|
||||
use reth_trie_common::Nibbles;
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
ops::RangeInclusive,
|
||||
};
|
||||
|
||||
/// A wrapper around a database transaction that loads prefix sets within a given block range.
|
||||
#[derive(Deref, Debug)]
|
||||
pub struct PrefixSetLoader<'a, TX>(&'a TX);
|
||||
@ -1,9 +1,9 @@
|
||||
use crate::PrefixSetLoader;
|
||||
use reth_db_api::transaction::DbTx;
|
||||
use reth_execution_errors::StateRootError;
|
||||
use reth_primitives::{BlockNumber, B256};
|
||||
use reth_trie::{
|
||||
hashed_cursor::{DatabaseHashedCursorFactory, HashedPostStateCursorFactory},
|
||||
prefix_set::PrefixSetLoader,
|
||||
trie_cursor::{DatabaseTrieCursorFactory, InMemoryTrieCursorFactory},
|
||||
updates::TrieUpdates,
|
||||
HashedPostState, StateRoot, StateRootProgress,
|
||||
|
||||
@ -5,9 +5,6 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
mod loader;
|
||||
pub use loader::PrefixSetLoader;
|
||||
|
||||
/// Collection of mutable prefix sets.
|
||||
#[derive(Clone, Default, Debug)]
|
||||
pub struct TriePrefixSetsMut {
|
||||
Reference in New Issue
Block a user