]> Untitled Git - bdk/commit
Merge bitcoindevkit/bdk#1971: esplora: `chain_update` errors if no point of connection
authormerge-script <valuedmammal@protonmail.com>
Thu, 3 Jul 2025 14:19:29 +0000 (10:19 -0400)
committermerge-script <valuedmammal@protonmail.com>
Thu, 3 Jul 2025 14:19:29 +0000 (10:19 -0400)
commitc496cde270c615b3a4b997d8407b9f9aac2d7dcb
tree110d30b87894407ded84dd912855400eaba9e1d9
parent5050537d190b347f56cd0712ba0a430da8dd9fac
parent568a36642c43d74132339a4e42dd41c545a764e1
Merge bitcoindevkit/bdk#1971: esplora: `chain_update` errors if no point of connection

568a36642c43d74132339a4e42dd41c545a764e1 refactor(esplora): in debug build assert that `latest_blocks` is not empty (valued mammal)
dd394cb31869df89c5e5b3bbbf88e26763348878 fix(esplora): `chain_update` errors if no point of connection (valued mammal)

Pull request description:

  ### Description

  Before, the `chain_update` function might have panicked if the local checkpoint was not on the same network as the remote server. Now if we have iterated all of the blocks of the local CP and do not find a point of agreement, then we return early with a `esplora_client::Error::HeaderHashNotFound`.

  cc bitcoindevkit/bdk_wallet#30

  ### Notes to the reviewers

  ### Changelog notice

  ### 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 +nightly fmt` and `cargo clippy` before committing

  #### New Features:

  * [ ] I've added tests for the new feature
  * [ ] I've added docs for the new feature

  #### Bugfixes:

  * [ ] 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:
  ValuedMammal:
    ACK 568a36642c43d74132339a4e42dd41c545a764e1

Tree-SHA512: 8dceaf24f1214d3463e14c7b5965beb34138985319962af04d1027028da2fddece185a7437a33713020e38b2a4129bd14e1dc0a3735e9ece15ab35a5f828360a