Skip to content

Commit a9f7377

Browse files
committed
Merge #1427: docs(esplora): fixed full_scan and sync documentation
f6dc689 docs(esplora): fixed `full_scan` and `sync` documentation (Wei Chen) Pull request description: <!-- You can erase any parts of this template not applicable to your Pull Request. --> ### Description Fixed documentation for `full_scan` and `sync` in `bdk_esplora`. ### Changelog notice <!-- Notice the release manager should include in the release tag message changelog --> <!-- See https://keepachangelog.com/en/1.0.0/ for examples --> * Updated documentation for `full_scan` and `sync` in `bdk_esplora`. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing ACKs for top commit: evanlinjin: ACK f6dc689 storopoli: ACK f6dc689 Tree-SHA512: 900fb1a2839379af867a6effad32ec4bdfb897330a72ee1e1ec203299e7f3d5fae576550aeed8fd93c5c70a13ad2b0e898033d8b45b490319b5d74216b93f332
2 parents 2703cc6 + f6dc689 commit a9f7377

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

crates/esplora/src/async_ext.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ pub trait EsploraAsyncExt {
2828
/// Scan keychain scripts for transactions against Esplora, returning an update that can be
2929
/// applied to the receiving structures.
3030
///
31-
/// * `local_tip`: the previously seen tip from [`LocalChain::tip`].
32-
/// * `keychain_spks`: keychains that we want to scan transactions for
31+
/// - `request`: struct with data required to perform a spk-based blockchain client full scan,
32+
/// see [`FullScanRequest`]
3333
///
3434
/// The full scan for each keychain stops after a gap of `stop_gap` script pubkeys with no
3535
/// associated transactions. `parallel_requests` specifies the max number of HTTP requests to
@@ -47,8 +47,6 @@ pub trait EsploraAsyncExt {
4747
/// and [Sparrow](https://www.sparrowwallet.com/docs/faq.html#ive-restored-my-wallet-but-some-of-my-funds-are-missing).
4848
///
4949
/// A `stop_gap` of 0 will be treated as a `stop_gap` of 1.
50-
///
51-
/// [`LocalChain::tip`]: bdk_chain::local_chain::LocalChain::tip
5250
async fn full_scan<K: Ord + Clone + Send>(
5351
&self,
5452
request: FullScanRequest<K>,
@@ -59,16 +57,12 @@ pub trait EsploraAsyncExt {
5957
/// Sync a set of scripts with the blockchain (via an Esplora client) for the data
6058
/// specified and return a [`TxGraph`].
6159
///
62-
/// * `local_tip`: the previously seen tip from [`LocalChain::tip`].
63-
/// * `misc_spks`: scripts that we want to sync transactions for
64-
/// * `txids`: transactions for which we want updated [`ConfirmationTimeHeightAnchor`]s
65-
/// * `outpoints`: transactions associated with these outpoints (residing, spending) that we
66-
/// want to include in the update
60+
/// - `request`: struct with data required to perform a spk-based blockchain client sync, see
61+
/// [`SyncRequest`]
6762
///
6863
/// If the scripts to sync are unknown, such as when restoring or importing a keychain that
6964
/// may include scripts that have been used, use [`full_scan`] with the keychain.
7065
///
71-
/// [`LocalChain::tip`]: bdk_chain::local_chain::LocalChain::tip
7266
/// [`full_scan`]: EsploraAsyncExt::full_scan
7367
async fn sync(
7468
&self,

crates/esplora/src/blocking_ext.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ pub trait EsploraExt {
2626
/// Scan keychain scripts for transactions against Esplora, returning an update that can be
2727
/// applied to the receiving structures.
2828
///
29-
/// * `local_tip`: the previously seen tip from [`LocalChain::tip`].
30-
/// * `keychain_spks`: keychains that we want to scan transactions for
29+
/// - `request`: struct with data required to perform a spk-based blockchain client full scan,
30+
/// see [`FullScanRequest`]
3131
///
3232
/// The full scan for each keychain stops after a gap of `stop_gap` script pubkeys with no
3333
/// associated transactions. `parallel_requests` specifies the max number of HTTP requests to
@@ -45,8 +45,6 @@ pub trait EsploraExt {
4545
/// and [Sparrow](https://www.sparrowwallet.com/docs/faq.html#ive-restored-my-wallet-but-some-of-my-funds-are-missing).
4646
///
4747
/// A `stop_gap` of 0 will be treated as a `stop_gap` of 1.
48-
///
49-
/// [`LocalChain::tip`]: bdk_chain::local_chain::LocalChain::tip
5048
fn full_scan<K: Ord + Clone>(
5149
&self,
5250
request: FullScanRequest<K>,
@@ -57,16 +55,12 @@ pub trait EsploraExt {
5755
/// Sync a set of scripts with the blockchain (via an Esplora client) for the data
5856
/// specified and return a [`TxGraph`].
5957
///
60-
/// * `local_tip`: the previously seen tip from [`LocalChain::tip`].
61-
/// * `misc_spks`: scripts that we want to sync transactions for
62-
/// * `txids`: transactions for which we want updated [`ConfirmationTimeHeightAnchor`]s
63-
/// * `outpoints`: transactions associated with these outpoints (residing, spending) that we
64-
/// want to include in the update
58+
/// - `request`: struct with data required to perform a spk-based blockchain client sync, see
59+
/// [`SyncRequest`]
6560
///
6661
/// If the scripts to sync are unknown, such as when restoring or importing a keychain that
6762
/// may include scripts that have been used, use [`full_scan`] with the keychain.
6863
///
69-
/// [`LocalChain::tip`]: bdk_chain::local_chain::LocalChain::tip
7064
/// [`full_scan`]: EsploraExt::full_scan
7165
fn sync(&self, request: SyncRequest, parallel_requests: usize) -> Result<SyncResult, Error>;
7266
}

0 commit comments

Comments
 (0)