refactor(esplora_ext): rename scan_txs to sync and scan_txs_with_keychains to full_scan

removed txids and outpoints params from full_scan
This commit is contained in:
Steve Myers
2023-12-06 21:21:02 -06:00
parent 95d34854f4
commit de54e710ed
9 changed files with 124 additions and 147 deletions

View File

@@ -188,13 +188,7 @@ fn main() -> anyhow::Result<()> {
// represents the last active spk derivation indices of keychains
// (`keychain_indices_update`).
let (graph_update, last_active_indices) = client
.scan_txs_with_keychains(
keychain_spks,
core::iter::empty(),
core::iter::empty(),
*stop_gap,
scan_options.parallel_requests,
)
.full_scan(keychain_spks, *stop_gap, scan_options.parallel_requests)
.context("scanning for transactions")?;
let mut graph = graph.lock().expect("mutex must not be poisoned");
@@ -312,7 +306,7 @@ fn main() -> anyhow::Result<()> {
}
let graph_update =
client.scan_txs(spks, txids, outpoints, scan_options.parallel_requests)?;
client.sync(spks, txids, outpoints, scan_options.parallel_requests)?;
graph.lock().unwrap().apply_update(graph_update)
}

View File

@@ -54,7 +54,7 @@ async fn main() -> Result<(), anyhow::Error> {
})
.collect();
let (update_graph, last_active_indices) = client
.scan_txs_with_keychains(keychain_spks, None, None, STOP_GAP, PARALLEL_REQUESTS)
.full_scan(keychain_spks, STOP_GAP, PARALLEL_REQUESTS)
.await?;
let missing_heights = update_graph.missing_heights(wallet.local_chain());
let chain_update = client.update_local_chain(prev_tip, missing_heights).await?;

View File

@@ -54,7 +54,7 @@ fn main() -> Result<(), anyhow::Error> {
.collect();
let (update_graph, last_active_indices) =
client.scan_txs_with_keychains(keychain_spks, None, None, STOP_GAP, PARALLEL_REQUESTS)?;
client.full_scan(keychain_spks, STOP_GAP, PARALLEL_REQUESTS)?;
let missing_heights = update_graph.missing_heights(wallet.local_chain());
let chain_update = client.update_local_chain(prev_tip, missing_heights)?;
let update = Update {