[client]: Add estimate_smart_fee_with_mode call#531
[client]: Add estimate_smart_fee_with_mode call#531tcharding merged 1 commit intorust-bitcoin:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for Bitcoin Core’s optional estimate_mode parameter on the estimatesmartfee RPC by introducing a dedicated client method and exposing a typed enum across versioned clients.
Changes:
- Add
FeeEstimateModeenum andestimate_smart_fee_with_mode(blocks, mode)client method (v17 macro implementation). - Re-export
FeeEstimateModefrom v17 into later client versions (v18–v30) so downstream users can access it consistently. - Add an integration test covering
estimate_smart_fee_with_modefor all supported modes.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| integration_test/tests/util.rs | Adds integration coverage for estimate_smart_fee_with_mode across all modes. |
| client/src/client_sync/v17/util.rs | Adds estimate_smart_fee_with_mode RPC wrapper method. |
| client/src/client_sync/v17/mod.rs | Introduces FeeEstimateMode enum used by the new method. |
| client/src/client_sync/v18/mod.rs | Re-exports FeeEstimateMode from v17 for v18 client users. |
| client/src/client_sync/v19/mod.rs | Re-exports FeeEstimateMode from v17 for v19 client users. |
| client/src/client_sync/v20/mod.rs | Re-exports FeeEstimateMode from v17 for v20 client users. |
| client/src/client_sync/v21/mod.rs | Re-exports FeeEstimateMode from v17 for v21 client users. |
| client/src/client_sync/v22/mod.rs | Re-exports FeeEstimateMode from v17 for v22 client users. |
| client/src/client_sync/v23/mod.rs | Re-exports FeeEstimateMode from v17 for v23 client users. |
| client/src/client_sync/v24/mod.rs | Re-exports FeeEstimateMode from v17 for v24 client users. |
| client/src/client_sync/v25/mod.rs | Re-exports FeeEstimateMode from v17 for v25 client users. |
| client/src/client_sync/v26/mod.rs | Re-exports FeeEstimateMode from v17 for v26 client users. |
| client/src/client_sync/v27/mod.rs | Re-exports FeeEstimateMode from v17 for v27 client users. |
| client/src/client_sync/v28/mod.rs | Re-exports FeeEstimateMode from v17 for v28 client users. |
| client/src/client_sync/v29/mod.rs | Re-exports FeeEstimateMode from v17 for v29 client users. |
| client/src/client_sync/v30/mod.rs | Re-exports FeeEstimateMode from v17 for v30 client users. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4392721 to
33015e6
Compare
33015e6 to
5ef6ba1
Compare
|
Very nice! In an atypical repository you nailed, first go. Good effort bro, thanks for the contribution. |
|
Hey @jamillambert did you set up the co-pilot review? If so I found it mildly useful in that I read it before reviewing myself and because it put all the high level changes in one spot it was easier to sanity check thePR. I'll probably need to see a few more before I totally make up my mind. And just now I stumbled upon this issue that might be interesting to you: rust-bitcoin/rust-bitcoin#3054 |
@tcharding I'm almost sure that this is related to my account settings, but there's probably a way to set it up for the repo too. If I may, from my experience with it, most of its comments are not useful, but a few make a good difference. And for the summary, when the PR is concise, it does a good job like this one, but when the PR changes many unrelated things it doesn't highlight the main points so well. But yeah, I think it's a good accelerator for a first quick review, so that a human reviewer can then go deeper on it. In addition, I previously tried coderabbit, and it seems better than copilot for reviews, I just use copilot because I have Github Pro for free through my university hehe.
https://github.com/settings/copilot/features
|
|
Cool, thanks for the info man. |


While I was working on peer-observer/peer-observer#362, I realized that corepc
estimatesmartfeecall was missing an optional param which is theestimate_mode.This PR creates a "secondary" method that also accepts an enum for
estimate_mode, filling this gap for the method. I ran the integration test that I created with all versions of bitcoin core fromv0.17tov30.2, exceptv30.0which I didn't find the binaries, but I suppose it still works. I tried to understand/follow the repo pattern, so let me know if anything is out of place.This is my first PR to corepc, so any feedback is welcome ^^.