-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add ElectrumClient::server_features
method
#641
Add ElectrumClient::server_features
method
#641
Conversation
e6d0f42
to
ce0b4d4
Compare
51289c5
to
01a64d1
Compare
Starting to review this! Will add comments and have this review finished in the next day- |
Thanks for the helpful guide to test this locally like this, I ran it, and one comment just to double check I'm on the same page with how this works is
|
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 01a64d1
A few comments/thoughts
-
I ran the local tests and the live tests for bdk-jvm (thanks for also adding the companion swift live test), was kind of fun to run those and see the output
-
Thanks for adding the code comments in the UDL for all of
ElectrumClient
-
The companion to the
estimate_fee
method but forEsploraClient
would be get_fee_estimates? (If so, that something I can look into adding at some point, the only reason I was wondering/asking is just because I got curious what the similar method would be for EsploraClient when I was reviewing this)
Yeah it's too bad the Esplora equivalent is not just a 1-for-1 match. Previously the clients were all adhering to a trait in the bdk crate so they all had that method on them (the inner implementation was a little different but I don't think we needed to do anything on our end if I remember correctly). In this case we'll have to find exactly how to do it for Esplora to offer it there (and you're right I don't think it's the same method name!). |
01a64d1
to
6518846
Compare
This PR adds two new methods on the electrum client:
server_features
. Also exposed is theServerFeaturesRes
struct.estimate_fee
TODO:
Notes to the reviewers
I added a live test with a testnet electrum server. Note that my test with our standard mempool.space signet server returned an error (with a nice error message!) saying the server did not support the
server_features
method.Note that those 2 tests don't run in the CI here because they are live tests, but I have run them both locally and they work well.
You can run these APIs locally in a Kotlin script:
fees.main.kts
Changelog notice
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features: