You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make this method work when the indexer is `KeychainTxOutIndex`. We
reintroduce the ability to get the internal `SpkTxOutIndex` from
`KeychainTxOutIndex` so that `SpkTxOutIndex::relevant_spks_of_tx` is
callable from `KeychainTxOutIndex`.
This commit renames `iter_spks_with_expected_txids` to
`expected_unconfirmed_spk_txids` for `TxGraph`, `IndexedTxGraph` and
`SyncRequestBuilder`. Docs are also improved to explain how these
methods are useful.
Remove unused `SyncRequestBuilder` methods.
Copy file name to clipboardExpand all lines: crates/chain/src/indexed_tx_graph.rs
+32-9Lines changed: 32 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
//! Contains the [`IndexedTxGraph`] and associated types. Refer to the
2
2
//! [`IndexedTxGraph`] documentation for more.
3
3
4
-
use core::fmt;
5
4
use core::ops::RangeBounds;
6
5
7
6
use alloc::{sync::Arc, vec::Vec};
@@ -345,15 +344,15 @@ where
345
344
impl<A,I>IndexedTxGraph<A,SpkTxOutIndex<I>>
346
345
where
347
346
A:Anchor,
348
-
I: fmt::Debug + Clone + Ord,
347
+
I:core::fmt::Debug + Clone + Ord,
349
348
{
350
-
/// Returns an iterator over unconfirmed transactions and their associated script pubkeys,
351
-
/// filtered within the specified `range`.
349
+
/// Iterate over unconfirmed txids that we expect to exist in a chain source's spk history
350
+
/// response.
352
351
///
353
-
/// This function delegates the transaction filtering to [`TxGraph::iter_spks_with_expected_txids`],
354
-
/// using the [`SpkTxOutIndex`] stored in [`IndexedTxGraph`]. The [`TxGraph`] internally scans
355
-
/// for unconfirmed transactions relevant to the indexed outputs.
356
-
pubfniter_spks_with_expected_txids<'a,O>(
352
+
/// This is used to fill [`SyncRequestBuilder::expected_unconfirmed_spk_txids`](bdk_core::spk_client::SyncRequestBuilder::expected_unconfirmed_spk_txids).
/// Iterate over unconfirmed txids that we expect to exist in a chain source's spk history
374
+
/// response.
375
+
///
376
+
/// This is used to fill [`SyncRequestBuilder::expected_unconfirmed_spk_txids`](bdk_core::spk_client::SyncRequestBuilder::expected_unconfirmed_spk_txids).
/// Returns an iterator over unconfirmed transactions and their associated script pubkeys,
1168
-
/// filtered within the specified `range`.
1167
+
/// Iterate over unconfirmed txids that we expect to exist in a chain source's spk history
1168
+
/// response.
1169
1169
///
1170
-
/// This function scans the transaction graph for unconfirmed transactions relevant to the
1171
-
/// provided [`SpkTxOutIndex`], determining which transactions should be considered based on
1172
-
/// indexed outputs.
1173
-
pubfniter_spks_with_expected_txids<'a,C,I>(
1170
+
/// This is used to fill [`SyncRequestBuilder::expected_unconfirmed_spk_txids`](bdk_core::spk_client::SyncRequestBuilder::expected_unconfirmed_spk_txids).
0 commit comments