esplora: chain_update errors if no point of connection#1971
Merged
ValuedMammal merged 2 commits intobitcoindevkit:masterfrom Jul 3, 2025
Merged
esplora: chain_update errors if no point of connection#1971ValuedMammal merged 2 commits intobitcoindevkit:masterfrom
chain_update errors if no point of connection#1971ValuedMammal merged 2 commits intobitcoindevkit:masterfrom
Conversation
evanlinjin
reviewed
Jun 7, 2025
65c4f7b to
96a6207
Compare
Collaborator
oleonardolima
left a comment
There was a problem hiding this comment.
utACK 96a6207
It's valid to note that we covered the fetch_blocks emptyness scenario on the client side too, at bitcoindevkit/rust-esplora-client#113
Comment on lines
+583
to
+585
| while client.get_height().await? < mine_to { | ||
| std::thread::sleep(Duration::from_millis(64)); | ||
| } |
Collaborator
There was a problem hiding this comment.
nit: FWIW, you can use wait_until_electrum_sees_block if #1640 ends up landing before this one.
Before, the `chain_update` function would hit a panic 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`.
96a6207 to
568a366
Compare
Collaborator
Author
16 tasks
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Before, the
chain_updatefunction 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 aesplora_client::Error::HeaderHashNotFound.cc bitcoindevkit/bdk_wallet#30
Notes to the reviewers
Changelog notice
Checklists
All Submissions:
cargo +nightly fmtandcargo clippybefore committingNew Features:
Bugfixes: