esplora: also fix the gap limit check in the async client
This commit is contained in:
parent
2c4e90a76f
commit
cb713e5b8c
@ -259,7 +259,13 @@ impl EsploraAsyncExt for esplora_client::AsyncClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if last_index > last_active_index.map(|i| i.saturating_add(stop_gap as u32)) {
|
let last_index = last_index.expect("Must be set since handles wasn't empty.");
|
||||||
|
let past_gap_limit = if let Some(i) = last_active_index {
|
||||||
|
last_index > i.saturating_add(stop_gap as u32)
|
||||||
|
} else {
|
||||||
|
last_index >= stop_gap as u32
|
||||||
|
};
|
||||||
|
if past_gap_limit {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user