Skip to content

Commit cefddbb

Browse files
authored
docs(engine): fix canonical_block_by_hash comments (#20067)
1 parent 8f5b4ae commit cefddbb

File tree

1 file changed

+4
-5
lines changed
  • crates/engine/tree/src/tree

1 file changed

+4
-5
lines changed

crates/engine/tree/src/tree/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,11 +1769,10 @@ where
17691769

17701770
/// Return an [`ExecutedBlock`] from database or in-memory state by hash.
17711771
///
1772-
/// NOTE: This cannot fetch [`ExecutedBlock`]s for _finalized_ blocks, instead it can only
1773-
/// fetch [`ExecutedBlock`]s for _canonical_ blocks, or blocks from sidechains that the node
1774-
/// has in memory.
1775-
///
1776-
/// For finalized blocks, this will return `None`.
1772+
/// Note: This function attempts to fetch the `ExecutedBlock` from either in-memory state
1773+
/// or the database. If the required historical data (such as trie change sets) has been
1774+
/// pruned for a given block, this operation will return an error. On archive nodes, it
1775+
/// can retrieve any block.
17771776
fn canonical_block_by_hash(&self, hash: B256) -> ProviderResult<Option<ExecutedBlock<N>>> {
17781777
trace!(target: "engine::tree", ?hash, "Fetching executed block by hash");
17791778
// check memory first

0 commit comments

Comments
 (0)