]> Untitled Git - bdk/commitdiff
docs(core): fix `resolve_candidates` doc for `(payload, BlockId)` input
author志宇 <hello@evanlinjin.me>
Mon, 22 Jun 2026 23:42:27 +0000 (23:42 +0000)
committer志宇 <hello@evanlinjin.me>
Mon, 22 Jun 2026 23:42:27 +0000 (23:42 +0000)
The signature takes candidates as `(payload, BlockId)` pairs, but the
doc comment still described the removed `block_id` closure.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
crates/core/src/block_queries.rs

index 5c6f5f1a6df03eb480ae502a9e163604c038021a..52c2a3f211efc928c6fe7474e4728b4b1f66eaec 100644 (file)
@@ -64,9 +64,9 @@ impl<B> BlockQueries<B> {
 impl<B: ToBlockHash> BlockQueries<B> {
     /// Resolves a set of candidate blocks against the blocks fetched so far.
     ///
-    /// Each candidate's [`BlockId`] is obtained via `block_id`. A candidate is *in-chain* when the
-    /// block resolved at its height is present and its hash matches the candidate's; the first such
-    /// candidate is returned as [`Confirmed`](BlockCandidateResolution::Confirmed).
+    /// Each candidate is a pair of an opaque payload and a [`BlockId`]. A candidate is *in-chain*
+    /// when the block resolved at that `BlockId`'s height is present and its hash matches; the first
+    /// such candidate's payload is returned as [`Confirmed`](BlockCandidateResolution::Confirmed).
     ///
     /// When no candidate is confirmed, the result tells the caller how to make progress:
     /// - [`Query`](BlockCandidateResolution::Query) — heights that still need fetching. These come