]> Untitled Git - bdk/commitdiff
docs(electrum): fixed `full_scan`, `sync`, and crate documentation
authorWei Chen <wzc110@gmail.com>
Mon, 6 May 2024 07:46:49 +0000 (15:46 +0800)
committer志宇 <hello@evanlinjin.me>
Fri, 10 May 2024 06:54:28 +0000 (14:54 +0800)
crates/electrum/src/electrum_ext.rs
crates/electrum/src/lib.rs

index af596305205299e21fb98b864b3a52aac56173c3..a746c52cf472d778e4c719ff7abcb9d2eec3afe1 100644 (file)
@@ -18,9 +18,8 @@ pub trait ElectrumExt {
     /// Full scan the keychain scripts specified with the blockchain (via an Electrum client) and
     /// returns updates for [`bdk_chain`] data structures.
     ///
-    /// - `prev_tip`: the most recent blockchain tip present locally
-    /// - `keychain_spks`: keychains that we want to scan transactions for
-    /// - `full_txs`: [`TxGraph`] that contains all previously known transactions
+    /// - `request`: struct with data required to perform a spk-based blockchain client full scan,
+    ///              see [`FullScanRequest`]
     ///
     /// The full scan for each keychain stops after a gap of `stop_gap` script pubkeys with no associated
     /// transactions. `batch_size` specifies the max number of script pubkeys to request for in a
@@ -35,12 +34,8 @@ pub trait ElectrumExt {
     /// Sync a set of scripts with the blockchain (via an Electrum client) for the data specified
     /// and returns updates for [`bdk_chain`] data structures.
     ///
-    /// - `prev_tip`: the most recent blockchain tip present locally
-    /// - `misc_spks`: an iterator of scripts we want to sync transactions for
-    /// - `full_txs`: [`TxGraph`] that contains all previously known transactions
-    /// - `txids`: transactions for which we want updated [`bdk_chain::Anchor`]s
-    /// - `outpoints`: transactions associated with these outpoints (residing, spending) that we
-    ///     want to include in the update
+    /// - `request`: struct with data required to perform a spk-based blockchain client sync,
+    ///              see [`SyncRequest`]
     ///
     /// `batch_size` specifies the max number of script pubkeys to request for in a single batch
     /// request.
@@ -450,7 +445,6 @@ fn populate_with_txids(
         };
 
         if graph_update.get_tx(txid).is_none() {
-            // TODO: We need to be able to insert an `Arc` of a transaction.
             let _ = graph_update.insert_tx(tx);
         }
         if let Some(anchor) = anchor {
index f645653e4bb0ff3701fa1b147d7d5b1097ade00b..eaa2405bfe7d3b53d84d0f5ebaf82963dd214ff7 100644 (file)
@@ -7,7 +7,7 @@
 //! keychain where the range of possibly used scripts is not known. In this case it is necessary to
 //! scan all keychain scripts until a number (the "stop gap") of unused scripts is discovered. For a
 //! sync or full scan the user receives relevant blockchain data and output updates for
-//! [`bdk_chain`] including [`bdk_chain::TxGraph`], which includes `txid`s and full transactions.
+//! [`bdk_chain`].
 //!
 //! Refer to [`example_electrum`] for a complete example.
 //!