Simplify Esplora::update_local_chain and add tests#1267
Simplify Esplora::update_local_chain and add tests#1267notmandatory merged 6 commits intobitcoindevkit:masterfrom
Esplora::update_local_chain and add tests#1267Conversation
e84e26f to
b7c8d18
Compare
Esplora::update_local_chain and add tests.
810e9c7 to
6fd083e
Compare
|
@notmandatory this doesn't really change the API |
LLFourn
left a comment
There was a problem hiding this comment.
Concept ACK. One thing looks like it needs to be updated.
6fd083e to
6f824cf
Compare
LLFourn
left a comment
There was a problem hiding this comment.
I found some more things that could be simplified as part of this.
1f17260 to
63fa710
Compare
Esplora::update_local_chain and add tests.Esplora::update_local_chain and add tests
|
self-ACK: 216648b Pushed a comment and docs better explaining what @evanlinjin was trying to explain to me here: #1267 (comment) |
danielabrozzoni
left a comment
There was a problem hiding this comment.
A few nits, otherwise LGTM
| }) | ||
| }; | ||
|
|
||
| // We have found point of agreement so the update will connect! |
There was a problem hiding this comment.
What if no point of agreement is found? Is this possible?
There was a problem hiding this comment.
This should never happen because the genesis block must connect! However, let's say hypothetically, the genesis doesn't connect (because the wallet and esplora are on different networks), the update formed will try replace the genesis, resulting in the local_chain::MissingGenesisError which is the error that we want!
notmandatory
left a comment
There was a problem hiding this comment.
Found a couple typos that should be fixed.
c122434 to
929b5dd
Compare
|
To fix CI in with: |
evanlinjin
left a comment
There was a problem hiding this comment.
ACK c5afbaa
Thank you @notmandatory for spotting the typos and fixing the CI!
Fixes #1199
Description
After a second look at the
update_local_chainimplementations, it was clear that they were over complicated. This PR simplifies theEsploraExt::update_local_chainmethod(s) of thebdk_esploracrate 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 forASSUME_FINAL_DEPTH.Changelog notice
Fixed
EsploraExt::update_local_chainlogic.Checklists
All Submissions:
cargo fmtandcargo clippybefore committingBugfixes:
* [ ] 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)