-
Notifications
You must be signed in to change notification settings - Fork 311
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
Check recent blocks are not empty #1725
base: master
Are you sure you want to change the base?
Conversation
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.
It looks good, but it seems to partially address the problem.
I'm trying to wrap my mind on the behavior when the latest_blocks
is empty. I wonder if it shouldn't be handled on the upstream fns too?
Otherwise, the same rogue Esplora server would still be able to crash the application as we expect to have a valid point of agreement here:
bdk/crates/esplora/src/blocking_ext.rs
Line 225 in 3bc45b5
let mut tip = point_of_agreement.expect("remote esplora should have same genesis block"); |
That's a good point. I think these |
942e5c1
to
f3efbda
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.
Concept ACK f3efbda
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 f3efbda
Can you add a simple test to exercise this condition in case we change the fix implementation later we make sure this remains fixed. I also had some discussion with @oleonardolima and @ValuedMammal and it would be good to have the test first and make sure without any changes this does in fact gets to and fails an at expect. |
I can try to work on that tomorrow. Heads up I will not be able to work on much next week |
Since the checkpoint is an optional field of the sync/scan response it may also make sense to have |
I was thinking that this should be an error variant in the Esplora client, as it should not ever respond with empty blocks when requested. I am unable to do much this week but I can review any new PRs that replace this one |
Closes #1696
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
Bugfixes: