-
Notifications
You must be signed in to change notification settings - Fork 393
esplora: chain_update
errors if no point of connection
#1971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
esplora: chain_update
errors if no point of connection
#1971
Conversation
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`.
65c4f7b
to
96a6207
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
while client.get_height().await? < mine_to { | ||
std::thread::sleep(Duration::from_millis(64)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: FWIW, you can use wait_until_electrum_sees_block
if #1640 ends up landing before this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 96a6207
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 aesplora_client::Error::HeaderHashNotFound
.cc bitcoindevkit/bdk_wallet#30
Notes to the reviewers
Changelog notice
Checklists
All Submissions:
cargo +nightly fmt
andcargo clippy
before committingNew Features:
Bugfixes: