Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimenez committed Nov 12, 2024
1 parent 3f0122f commit fdb55e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/engine/tree/src/tree/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ impl StdReceiverStream {
/// Then it updates relevant leaves according to the result of the transaction.
#[allow(dead_code)]
pub(crate) struct StateRootTask<Factory> {
/// Incoming state updates.
state_stream: StdReceiverStream,
/// Task configuration.
config: StateRootConfig<Factory>,
}

Expand All @@ -79,13 +81,15 @@ impl<Factory> StateRootTask<Factory>
where
Factory: Send + 'static,
{
/// Creates a new `StateRootTask`.
pub(crate) const fn new(
config: StateRootConfig<Factory>,
state_stream: StdReceiverStream,
) -> Self {
Self { config, state_stream }
}

/// Spawns the state root task and returns a handle to await its result.
pub(crate) fn spawn(self) -> StateRootHandle {
let (tx, rx) = mpsc::sync_channel(1);
std::thread::Builder::new()
Expand All @@ -100,6 +104,7 @@ where
StateRootHandle::new(rx)
}

/// Handles state updates.
fn on_state_update(
_view: &reth_provider::providers::ConsistentDbView<impl Send + 'static>,
_input: &std::sync::Arc<reth_trie::TrieInput>,
Expand Down

0 comments on commit fdb55e9

Please sign in to comment.