From cefddbb39db0575195d967ef0cb61afebace33ec Mon Sep 17 00:00:00 2001 From: Block Wizard Date: Tue, 2 Dec 2025 13:06:40 +0200 Subject: [PATCH] docs(engine): fix canonical_block_by_hash comments (#20067) --- crates/engine/tree/src/tree/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/engine/tree/src/tree/mod.rs b/crates/engine/tree/src/tree/mod.rs index 9d8d2df82f..2c1a4b951b 100644 --- a/crates/engine/tree/src/tree/mod.rs +++ b/crates/engine/tree/src/tree/mod.rs @@ -1769,11 +1769,10 @@ where /// Return an [`ExecutedBlock`] from database or in-memory state by hash. /// - /// NOTE: This cannot fetch [`ExecutedBlock`]s for _finalized_ blocks, instead it can only - /// fetch [`ExecutedBlock`]s for _canonical_ blocks, or blocks from sidechains that the node - /// has in memory. - /// - /// For finalized blocks, this will return `None`. + /// Note: This function attempts to fetch the `ExecutedBlock` from either in-memory state + /// or the database. If the required historical data (such as trie change sets) has been + /// pruned for a given block, this operation will return an error. On archive nodes, it + /// can retrieve any block. fn canonical_block_by_hash(&self, hash: B256) -> ProviderResult>> { trace!(target: "engine::tree", ?hash, "Fetching executed block by hash"); // check memory first