Skip to content

Commit f1c013a

Browse files
LagginTimesevanlinjin
authored andcommitted
docs(electrum): fixed full_scan, sync, and crate documentation
1 parent 2d7fb6f commit f1c013a

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

crates/electrum/src/electrum_ext.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ pub trait ElectrumExt {
1818
/// Full scan the keychain scripts specified with the blockchain (via an Electrum client) and
1919
/// returns updates for [`bdk_chain`] data structures.
2020
///
21-
/// - `prev_tip`: the most recent blockchain tip present locally
22-
/// - `keychain_spks`: keychains that we want to scan transactions for
23-
/// - `full_txs`: [`TxGraph`] that contains all previously known transactions
21+
/// - `request`: struct with data required to perform a spk-based blockchain client full scan,
22+
/// see [`FullScanRequest`]
2423
///
2524
/// The full scan for each keychain stops after a gap of `stop_gap` script pubkeys with no associated
2625
/// transactions. `batch_size` specifies the max number of script pubkeys to request for in a
@@ -35,12 +34,8 @@ pub trait ElectrumExt {
3534
/// Sync a set of scripts with the blockchain (via an Electrum client) for the data specified
3635
/// and returns updates for [`bdk_chain`] data structures.
3736
///
38-
/// - `prev_tip`: the most recent blockchain tip present locally
39-
/// - `misc_spks`: an iterator of scripts we want to sync transactions for
40-
/// - `full_txs`: [`TxGraph`] that contains all previously known transactions
41-
/// - `txids`: transactions for which we want updated [`bdk_chain::Anchor`]s
42-
/// - `outpoints`: transactions associated with these outpoints (residing, spending) that we
43-
/// want to include in the update
37+
/// - `request`: struct with data required to perform a spk-based blockchain client sync,
38+
/// see [`SyncRequest`]
4439
///
4540
/// `batch_size` specifies the max number of script pubkeys to request for in a single batch
4641
/// request.
@@ -450,7 +445,6 @@ fn populate_with_txids(
450445
};
451446

452447
if graph_update.get_tx(txid).is_none() {
453-
// TODO: We need to be able to insert an `Arc` of a transaction.
454448
let _ = graph_update.insert_tx(tx);
455449
}
456450
if let Some(anchor) = anchor {

crates/electrum/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! keychain where the range of possibly used scripts is not known. In this case it is necessary to
88
//! scan all keychain scripts until a number (the "stop gap") of unused scripts is discovered. For a
99
//! sync or full scan the user receives relevant blockchain data and output updates for
10-
//! [`bdk_chain`] including [`bdk_chain::TxGraph`], which includes `txid`s and full transactions.
10+
//! [`bdk_chain`].
1111
//!
1212
//! Refer to [`example_electrum`] for a complete example.
1313
//!

0 commit comments

Comments
 (0)