diff --git a/src/blockchain/esplora/reqwest.rs b/src/blockchain/esplora/reqwest.rs index 0d4050608..302e811fd 100644 --- a/src/blockchain/esplora/reqwest.rs +++ b/src/blockchain/esplora/reqwest.rs @@ -213,7 +213,6 @@ impl WalletSync for EsploraBlockchain { }; database.commit_batch(batch_update)?; - Ok(()) } } diff --git a/src/blockchain/script_sync.rs b/src/blockchain/script_sync.rs index 057527360..2c4b26cef 100644 --- a/src/blockchain/script_sync.rs +++ b/src/blockchain/script_sync.rs @@ -5,6 +5,7 @@ returns associated transactions i.e. electrum. #![allow(dead_code)] use crate::{ database::{BatchDatabase, BatchOperations, DatabaseUtils}, + error::MissingCachedScripts, wallet::time::Instant, BlockTime, Error, KeychainKind, LocalUtxo, TransactionDetails, }; @@ -34,11 +35,12 @@ pub fn start(db: &D, stop_gap: usize) -> Result let scripts_needed = db .iter_script_pubkeys(Some(keychain))? .into_iter() - .collect(); + .collect::>(); let state = State::new(db); Ok(Request::Script(ScriptReq { state, + initial_scripts_needed: scripts_needed.len(), scripts_needed, script_index: 0, stop_gap, @@ -50,6 +52,7 @@ pub fn start(db: &D, stop_gap: usize) -> Result pub struct ScriptReq<'a, D: BatchDatabase> { state: State<'a, D>, script_index: usize, + initial_scripts_needed: usize, // if this is 1, we assume the descriptor is not derivable scripts_needed: VecDeque