]> Untitled Git - bdk/commitdiff
docs(chain): cross-reference `with_mtp` from `view_task`
author志宇 <hello@evanlinjin.me>
Thu, 18 Jun 2026 21:53:47 +0000 (21:53 +0000)
committer志宇 <hello@evanlinjin.me>
Fri, 19 Jun 2026 06:31:49 +0000 (06:31 +0000)
`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) <noreply@anthropic.com>
crates/chain/src/canonical.rs

index 7eba57b85dae96bab33973ce981d944ab474214c..02133dec9a658f8dffbb0a6b55b54d212697b43c 100644 (file)
@@ -529,6 +529,9 @@ impl<A: Anchor> CanonicalTxs<A> {
     ///
     /// 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<A>,