]> Untitled Git - bdk/commit
fix(esplora): treat parallel_requests of 0 as 1
authoryahia008 <yahyatijjani99@gmail.com>
Fri, 9 Oct 2026 13:54:26 +0000 (14:54 +0100)
committer志宇 <hello@evanlinjin.me>
Mon, 19 Oct 2026 02:36:38 +0000 (13:36 +1100)
commite990ea78e9fd4dd6fbcb1577f43873d9234ab87a
treeb629f53af113b3cb066239ba39ba954917f0fcbd
parente4d1db3180c1a95cda0a3dcffe452dd79a4f86a1
fix(esplora): treat parallel_requests of 0 as 1

A `parallel_requests` of 0 made `full_scan` and `sync` skip every request
and return an empty `Ok`, because each fetch loop takes its next batch with
`.take(parallel_requests)` and stops when the batch is empty.

Clamp it to 1 in each fetch loop, for both the blocking and async clients,
as `stop_gap` already is. Document this on `full_scan` and `sync`, and add
tests covering the spk, txid and outpoint paths.

Fixes #2291
crates/esplora/src/async_ext.rs
crates/esplora/src/blocking_ext.rs
crates/esplora/tests/async_ext.rs
crates/esplora/tests/blocking_ext.rs