From: 志宇 Date: Thu, 18 Jun 2026 21:53:47 +0000 (+0000) Subject: docs(chain): cross-reference `with_mtp` from `view_task` X-Git-Tag: pre-fold-backup~6 X-Git-Url: http://internal-gitweb-vhost/-script/src/example_cli/database/encode/struct.EncoderStringWriter.html?a=commitdiff_plain;h=5dc4b51a2d799b5580ecfa9630b8cd7a43043905;p=bdk docs(chain): cross-reference `with_mtp` from `view_task` `CanonicalTxs::view_task` is the entry point for building a view, but MTP computation is opt-in via `CanonicalViewTask::with_mtp`. Cross-reference it so it is discoverable from the view-building method. Co-Authored-By: Claude Opus 4.8 (1M context) --- diff --git a/crates/chain/src/canonical.rs b/crates/chain/src/canonical.rs index 7eba57b8..02133dec 100644 --- a/crates/chain/src/canonical.rs +++ b/crates/chain/src/canonical.rs @@ -529,6 +529,9 @@ impl CanonicalTxs { /// /// This is the second phase of the canonicalization pipeline. Blocks fetched during /// phase 1 are passed through so they can be reused without redundant queries. + /// + /// To also compute median-time-past (MTP) values for the resulting view, call + /// [`CanonicalViewTask::with_mtp`] on the returned task. pub fn view_task<'g, B>( self, tx_graph: &'g TxGraph,