Skip to content

Commit b57768d

Browse files
Keerthi421LagginTimes
authored andcommitted
fix(electrum): improve tx validation and gap limit scanning
1 parent 7a18cad commit b57768d

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
@@ -339,6 +339,10 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
339339
}
340340
}
341341
}
342+
343+
if unused_spk_count >= stop_gap {
344+
break;
345+
}
342346
}
343347

344348
Ok(last_active_index)

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)