From: merge-script Date: Mon, 19 Oct 2026 02:52:27 +0000 (+1100) Subject: Merge bitcoindevkit/bdk#2360: fix(esplora,electrum): treat `parallel_requests`/`batch... X-Git-Url: http://internal-gitweb-vhost/-client-interface/%22https:/bdk/keys/enum.CreateWithPersistError.html?a=commitdiff_plain;h=HEAD;p=bdk Merge bitcoindevkit/bdk#2360: fix(esplora,electrum): treat `parallel_requests`/`batch_size` of 0 as 1 0d8d26c3b1977bd55544eeb064d108046dcf9f67 fix(electrum): treat batch_size of 0 as 1 (yahia008) e990ea78e9fd4dd6fbcb1577f43873d9234ab87a fix(esplora): treat parallel_requests of 0 as 1 (yahia008) Pull request description: ## Description Fixes #2291. Passing `parallel_requests = 0` to `bdk_esplora`, or `batch_size = 0` to `bdk_electrum`, caused `full_scan` and `sync` to skip all requests and return an empty `Ok`. This made the wallet appear synced despite missing transactions, without indicating that the scan or sync had failed. ### Notes to the reviewers This change ensures that zero-valued request limits do not cause `full_scan` or `sync` to silently skip the requested work and return an apparently successful result. The regression tests use an unreachable server endpoint to verify that the requested fetches are not skipped when the relevant parameter is zero. The Esplora tests cover `parallel_requests = 0`, while the Electrum tests cover `batch_size = 0` and `parallel_requests = 0`, including the separate fetch loops for script pubkeys, transaction IDs, and outpoints. ### Changelog notice ```text ### Fixed - Prevent `full_scan` and `sync` from silently skipping requests when `parallel_requests` or `batch_size` is zero in `bdk_esplora` and `bdk_electrum. ``` ### Checklists #### All Submissions: - [x] I followed the [[contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md). ACKs for top commit: evanlinjin: ACK 0d8d26c3b1977bd55544eeb064d108046dcf9f67 Tree-SHA512: c2753075284f43a0ac32787cda8843e804a08d79632898aff6f848595b7c3716acd92994b4cf8e5f567974a30a726afeebdd3ad352945a8ae8436d8c156fd509 --- 126ff075a70491f2d991170a663190f0ecc5e871