Skip to content

Commit d69907b

Browse files
Keerthi421LagginTimes
authored andcommitted
fix(electrum): improve tx validation and gap limit scanning
1 parent 9f1dc7b commit d69907b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

crates/electrum/src/bdk_electrum_client.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
307307
}
308308
}
309309
}
310+
311+
if unused_spk_count >= stop_gap {
312+
break;
313+
}
310314
}
311315

312316
// Batch validate all collected transactions

crates/electrum/tests/test_electrum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ fn test_check_fee_calculation() -> anyhow::Result<()> {
885885

886886
#[test]
887887
pub fn test_sync_performance() -> anyhow::Result<()> {
888-
const EXPECTED_MAX_SYNC_TIME: Duration = Duration::from_secs(5);
888+
const EXPECTED_MAX_SYNC_TIME: Duration = Duration::from_secs(15);
889889
const NUM_ADDRESSES: usize = 1000;
890890

891891
let env = TestEnv::new()?;

0 commit comments

Comments
 (0)