]> Untitled Git - bdk/commit
fix: define and document `stop_gap`
authorJose Storopoli <jose@storopoli.io>
Tue, 26 Mar 2024 15:44:03 +0000 (12:44 -0300)
committerJose Storopoli <jose@storopoli.io>
Tue, 26 Mar 2024 15:44:03 +0000 (12:44 -0300)
commit7c1861aab9a76f2ba4a2ae372a16c9669a33f5de
treef494d63cdb3b4d76c4724385cc610fac754cf45e
parent80e190b3e734a46ba73925d381fe4f1a9941bf2a
fix: define and document `stop_gap`

- changes the code implementation to "the maximum number of consecutive unused addresses"
  in esplora async and blocking extjensions.
- treat `stop_gap = 0` as `stop_gap = 1` for all purposes.
- 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
crates/esplora/src/async_ext.rs
crates/esplora/src/blocking_ext.rs
crates/esplora/tests/async_ext.rs
crates/esplora/tests/blocking_ext.rs