c5afbaa95d7bc699981d6fe7f9964a41b7587d5c ci: update zstd-sys version to work with MSRV 1.63 (Steve Myers) 929b5ddb0c2e0dc7c346c08888201ac54efab84d refactor(esplora): better variable naming and docs (志宇) 216648bcfd2c622890bf7f50fb2eaa4396c42ed1 chore(esplora): Clarify consistency guarantees (LLFourn) 63fa710319f231f7f28d92cb49b0399f3250c9da fix(esplora): reuse returned height instead of zipping (志宇) 6f824cf325c6c882b00742d814be1d72602f05a6 test(esplora): introduce test cases for `update_local_chain` (志宇) f05e8502e69a051af9869be6ba5ad9a376b25fc2 feat(esplora): greatly simplify `update_local_chain` (志宇) Pull request description: Fixes #1199 ### Description After a second look at the `update_local_chain` implementations, it was clear that they were over complicated. This PR simplifies the `EsploraExt::update_local_chain` method(s) of the `bdk_esplora` crate and adds a whole bunch of tests. ### Notes to the reviewers The description of #1199 is very brief, however @danielabrozzoni mentioned about potentially-problematic logic with `ASSUME_FINAL_DEPTH`. The logic was indeed convoluted and it did not need to be that way. This PR removes the need for `ASSUME_FINAL_DEPTH`. ### Changelog notice Fixed - Simplified `EsploraExt::update_local_chain` logic. ### 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 #### Bugfixes: ~* [ ] This pull request breaks the existing API~ ~* [ ] I've added tests to reproduce the issue which are now passing~ (there are now lots of tests though) * [x] I'm linking the issue being fixed by this PR ACKs for top commit: evanlinjin: ACK c5afbaa95d7bc699981d6fe7f9964a41b7587d5c notmandatory: utACK c5afbaa95d7bc699981d6fe7f9964a41b7587d5c Tree-SHA512: f588493a4643f0f68d3181f27adf91793d4e336be6e853a26289e0916ed83169e1067260b75e627f190842f691ec095e668c0b799ca80e7da2849dd28de32754
BDK Esplora
BDK Esplora extends esplora-client
to update bdk_chain
structures
from an Esplora server.
Usage
There are two versions of the extension trait (blocking and async).
For blocking-only:
bdk_esplora = { version = "0.3", features = ["blocking"] }
For async-only:
bdk_esplora = { version = "0.3", features = ["async"] }
For async-only (with https):
bdk_esplora = { version = "0.3", features = ["async-https"] }
To use the extension traits:
// for blocking
use bdk_esplora::EsploraExt;
// for async
// use bdk_esplora::EsploraAsyncExt;
For full examples, refer to example-crates/wallet_esplora_blocking
and example-crates/wallet_esplora_async
.