From: Steve Myers Date: Tue, 26 Mar 2024 23:59:13 +0000 (-0500) Subject: Merge bitcoindevkit/bdk#1351: fix: define and document `stop_gap` X-Git-Tag: v1.0.0-alpha.8~2 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/static/struct.Persist.html?a=commitdiff_plain;h=380bc4025a0668079a7406b237aad507ef084aea;p=bdk Merge bitcoindevkit/bdk#1351: fix: define and document `stop_gap` 7c1861aab9a76f2ba4a2ae372a16c9669a33f5de fix: define and document `stop_gap` (Jose Storopoli) Pull request description: ### Description - changes the code implementation to "the maximum number of consecutive unused addresses" in esplora async and blocking extensions. - for all purposes treats `stop_gap = 0` as `stop_gap = 1`. - renames `past_gap_limit` to `gap_limit_reached` to indicate we want to break once the gap limit is reached and not go further in `full_scan`, as suggested in https://github.com/bitcoindevkit/bdk/issues/1227#issuecomment-1859040463 - change the tests according to the new implementation. - add notes on what `stop_gap` means and links to convergent definition in other Bitcoin-related software. Closes #1227. ### Notes to the reviewers We can iterate over the wording and presentation of the `stop_gap` definition and details. ### Changelog notice - BREAKING: change `stop_gap` definition and effects in `full_scan` to reflect the common definitions in most Bitcoin-related software. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [x] I've added tests for the new feature * [x] I've added docs for the new feature #### Bugfixes: * [x] This pull request breaks the existing API * [x] I've added tests to reproduce the issue which are now passing * [x] I'm linking the issue being fixed by this PR ACKs for top commit: notmandatory: ACK 7c1861aab9a76f2ba4a2ae372a16c9669a33f5de Tree-SHA512: d9bc5f8ebace47fa33f023ceddb3df5629ad3e7fa130a407311a0303ac59810e6527254efb9075f9e87bf37bec8655c4726eb9cb99f6b038fbeb742f79e995c0 --- 380bc4025a0668079a7406b237aad507ef084aea