Skip to content

Commit 3b03c7b

Browse files
committed
chore(core)!: rename FullScanResult to FullScanResponse
1 parent 1411cb8 commit 3b03c7b

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

crates/core/src/spk_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ impl<K: Ord + Clone> FullScanRequest<K> {
459459
/// See also [`FullScanRequest`].
460460
#[must_use]
461461
#[derive(Debug)]
462-
pub struct FullScanResult<K, A = ConfirmationBlockTime> {
462+
pub struct FullScanResponse<K, A = ConfirmationBlockTime> {
463463
/// Relevant transaction data discovered during the scan.
464464
pub tx_update: crate::TxUpdate<A>,
465465
/// Last active indices for the corresponding keychains (`K`). An index is active if it had a
@@ -469,7 +469,7 @@ pub struct FullScanResult<K, A = ConfirmationBlockTime> {
469469
pub chain_update: Option<CheckPoint>,
470470
}
471471

472-
impl<K, A> Default for FullScanResult<K, A> {
472+
impl<K, A> Default for FullScanResponse<K, A> {
473473
fn default() -> Self {
474474
Self {
475475
tx_update: Default::default(),

crates/electrum/src/bdk_electrum_client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use bdk_core::{
22
bitcoin::{block::Header, BlockHash, OutPoint, ScriptBuf, Transaction, Txid},
33
collections::{BTreeMap, HashMap},
4-
spk_client::{FullScanRequest, FullScanResult, SyncRequest, SyncResponse},
4+
spk_client::{FullScanRequest, FullScanResponse, SyncRequest, SyncResponse},
55
BlockId, CheckPoint, ConfirmationBlockTime, TxUpdate,
66
};
77
use electrum_client::{ElectrumApi, Error, HeaderNotification};
@@ -126,7 +126,7 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
126126
stop_gap: usize,
127127
batch_size: usize,
128128
fetch_prev_txouts: bool,
129-
) -> Result<FullScanResult<K>, Error> {
129+
) -> Result<FullScanResponse<K>, Error> {
130130
let mut request: FullScanRequest<K> = request.into();
131131

132132
let tip_and_latest_blocks = match request.chain_tip() {
@@ -159,7 +159,7 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
159159
_ => None,
160160
};
161161

162-
Ok(FullScanResult {
162+
Ok(FullScanResponse {
163163
tx_update,
164164
chain_update,
165165
last_active_indices,

crates/electrum/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! This crate is used for returning updates from Electrum servers.
22
//!
33
//! Updates are returned as either a [`SyncResponse`] (if [`BdkElectrumClient::sync()`] is called),
4-
//! or a [`FullScanResult`] (if [`BdkElectrumClient::full_scan()`] is called).
4+
//! or a [`FullScanResponse`] (if [`BdkElectrumClient::full_scan()`] is called).
55
//!
66
//! In most cases [`BdkElectrumClient::sync()`] is used to sync the transaction histories of scripts
77
//! that the application cares about, for example the scripts for all the receive addresses of a
@@ -15,7 +15,7 @@
1515
//!
1616
//! [`example_electrum`]: https://github.com/bitcoindevkit/bdk/tree/master/example-crates/example_electrum
1717
//! [`SyncResponse`]: bdk_core::spk_client::SyncResponse
18-
//! [`FullScanResult`]: bdk_core::spk_client::FullScanResult
18+
//! [`FullScanResponse`]: bdk_core::spk_client::FullScanResponse
1919
2020
#![warn(missing_docs)]
2121

crates/esplora/src/async_ext.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use async_trait::async_trait;
22
use bdk_core::collections::{BTreeMap, BTreeSet, HashSet};
3-
use bdk_core::spk_client::{FullScanRequest, FullScanResult, SyncRequest, SyncResponse};
3+
use bdk_core::spk_client::{FullScanRequest, FullScanResponse, SyncRequest, SyncResponse};
44
use bdk_core::{
55
bitcoin::{BlockHash, OutPoint, ScriptBuf, Txid},
66
BlockId, CheckPoint, ConfirmationBlockTime, Indexed, TxUpdate,
@@ -32,7 +32,7 @@ pub trait EsploraAsyncExt {
3232
request: R,
3333
stop_gap: usize,
3434
parallel_requests: usize,
35-
) -> Result<FullScanResult<K>, Error>;
35+
) -> Result<FullScanResponse<K>, Error>;
3636

3737
/// Sync a set of scripts, txids, and/or outpoints against Esplora.
3838
///
@@ -56,7 +56,7 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
5656
request: R,
5757
stop_gap: usize,
5858
parallel_requests: usize,
59-
) -> Result<FullScanResult<K>, Error> {
59+
) -> Result<FullScanResponse<K>, Error> {
6060
let mut request = request.into();
6161
let keychains = request.keychains();
6262

@@ -93,7 +93,7 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
9393
_ => None,
9494
};
9595

96-
Ok(FullScanResult {
96+
Ok(FullScanResponse {
9797
chain_update,
9898
tx_update,
9999
last_active_indices,

crates/esplora/src/blocking_ext.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use bdk_core::collections::{BTreeMap, BTreeSet, HashSet};
2-
use bdk_core::spk_client::{FullScanRequest, FullScanResult, SyncRequest, SyncResponse};
2+
use bdk_core::spk_client::{FullScanRequest, FullScanResponse, SyncRequest, SyncResponse};
33
use bdk_core::{
44
bitcoin::{BlockHash, OutPoint, ScriptBuf, Txid},
55
BlockId, CheckPoint, ConfirmationBlockTime, Indexed, TxUpdate,
@@ -30,7 +30,7 @@ pub trait EsploraExt {
3030
request: R,
3131
stop_gap: usize,
3232
parallel_requests: usize,
33-
) -> Result<FullScanResult<K>, Error>;
33+
) -> Result<FullScanResponse<K>, Error>;
3434

3535
/// Sync a set of scripts, txids, and/or outpoints against Esplora.
3636
///
@@ -52,7 +52,7 @@ impl EsploraExt for esplora_client::BlockingClient {
5252
request: R,
5353
stop_gap: usize,
5454
parallel_requests: usize,
55-
) -> Result<FullScanResult<K>, Error> {
55+
) -> Result<FullScanResponse<K>, Error> {
5656
let mut request = request.into();
5757

5858
let chain_tip = request.chain_tip();
@@ -90,7 +90,7 @@ impl EsploraExt for esplora_client::BlockingClient {
9090
_ => None,
9191
};
9292

93-
Ok(FullScanResult {
93+
Ok(FullScanResponse {
9494
chain_update,
9595
tx_update,
9696
last_active_indices,

crates/wallet/src/wallet/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use bdk_chain::{
2626
indexer::keychain_txout::KeychainTxOutIndex,
2727
local_chain::{ApplyHeaderError, CannotConnectError, CheckPoint, CheckPointIter, LocalChain},
2828
spk_client::{
29-
FullScanRequest, FullScanRequestBuilder, FullScanResult, SyncRequest, SyncRequestBuilder,
29+
FullScanRequest, FullScanRequestBuilder, FullScanResponse, SyncRequest, SyncRequestBuilder,
3030
SyncResponse,
3131
},
3232
tx_graph::{CalculateFeeError, CanonicalTx, TxGraph, TxUpdate},
@@ -132,8 +132,8 @@ pub struct Update {
132132
pub chain: Option<CheckPoint>,
133133
}
134134

135-
impl From<FullScanResult<KeychainKind>> for Update {
136-
fn from(value: FullScanResult<KeychainKind>) -> Self {
135+
impl From<FullScanResponse<KeychainKind>> for Update {
136+
fn from(value: FullScanResponse<KeychainKind>) -> Self {
137137
Self {
138138
last_active_indices: value.last_active_indices,
139139
tx_update: value.tx_update,

0 commit comments

Comments
 (0)