Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions crates/engine/tree/src/tree/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,20 @@ impl<N: NodePrimitives> TreeState<N> {
pub const fn canonical_block_number(&self) -> BlockNumber {
self.canonical_head().number
}

/// Returns a reference to the [`StateTrieOverlayManager`] that tracks flattened trie overlays
/// for all current in-memory blocks.
///
/// **Added by StreamingFast for Firehose/op-reth.**
/// `OpFirehoseEngineValidator` (in `reth-optimism-firehose`) is an external re-implementation
/// of `BasicEngineValidator` that adds Firehose live-tracing hooks. Because it lives outside
/// this crate it cannot access `pub(crate)` fields directly. This accessor lets it call
/// `.with_state_trie_overlay_manager(state.tree_state().state_trie_overlays().clone())`
/// in its `overlay_builder_for_parent` helper — the exact same pattern `BasicEngineValidator`
/// uses internally — so there is no behavioral divergence between the two validators.
pub fn state_trie_overlays(&self) -> &StateTrieOverlayManager<N> {
&self.state_trie_overlays
}
}

#[cfg(test)]
Expand Down
Loading