File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,10 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
263
263
let mut txs_to_validate = Vec :: new ( ) ;
264
264
265
265
loop {
266
+ if unused_spk_count >= stop_gap {
267
+ break ;
268
+ }
269
+
266
270
let spks = ( 0 ..batch_size)
267
271
. map_while ( |_| spks_with_expected_txids. next ( ) )
268
272
. collect :: < Vec < _ > > ( ) ;
@@ -277,9 +281,6 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
277
281
for ( ( spk_index, spk) , spk_history) in spks. into_iter ( ) . zip ( spk_histories) {
278
282
if spk_history. is_empty ( ) {
279
283
unused_spk_count = unused_spk_count. saturating_add ( 1 ) ;
280
- if unused_spk_count >= stop_gap {
281
- break ;
282
- }
283
284
} else {
284
285
last_active_index = Some ( spk_index) ;
285
286
unused_spk_count = 0 ;
Original file line number Diff line number Diff line change @@ -880,7 +880,7 @@ fn test_check_fee_calculation() -> anyhow::Result<()> {
880
880
881
881
#[ test]
882
882
pub fn test_sync_performance ( ) -> anyhow:: Result < ( ) > {
883
- const EXPECTED_MAX_SYNC_TIME : Duration = Duration :: from_secs ( 5 ) ;
883
+ const EXPECTED_MAX_SYNC_TIME : Duration = Duration :: from_secs ( 15 ) ;
884
884
const NUM_ADDRESSES : usize = 1000 ;
885
885
886
886
let env = TestEnv :: new ( ) ?;
You can’t perform that action at this time.
0 commit comments