mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:47:36 +00:00
rpc: Use OBJ_NAMED_PARAMS in estimatesmartfee #36976
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36976
Loading…
Reference in a new issue
No description provided.
Delete branch "2611-rpc-estimatesmartfee-OBJ_NAMED_PARAMS"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
estimatesmartfeeis the only RPC that rejects named arguments for options, which seems confusing and not user friendly.Fix it by using
OBJ_NAMED_PARAMS.The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
Reviewers, this pull request conflicts with the following ones:
getorphantxsverbosity help and type checking by l0rinc)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
🔵 Suggestion · Named
estimatesmartfeeoptions are missing from release notesThe new top-level
fee_rate_estimatorandverbosityarguments are user-facing additions, but the release notes describe only the existingoptionsobject form.Location:
src/rpc/fees.cpp:54(head).Review coverage was incomplete.
Reviewed:
fad909a4f2fc· Review report · Previous reportspermalink
rendered diff
Concept ACK
I only took a quick look, but more consistent named options for
estimatesmartfeemake sense to me.Since my PR depends on the
TestNodeCLIparser fix, I’d prefer splitting the fix into its own PR - unless others are more comfortable reviewing it here.Both values here are defaults. Using non-default values and checking the result would show that the named arguments actually select the estimator and enable the extra statistics.
Example patch
bitcoin-clialways ends this output with a newline as far as I can tell, matching a required trailing\noutside the capture withre.fullmatchlets us dropremovesuffixand-?\d+would also be simpler (and more correct since the old[-0-9]+also matches values like-3-).Example patch
Nit1: The options checks would read more clearly with
RPC_TYPE_ERRORandRPC_INVALID_PARAMETERonce the shared Python error codes land.Nit2: formatting
Thx, picked a different existing test case where the passed value matters.
thx, ran formatter on this commit.
Nice.
fullmatchis more self-documenting here when reading the code.Feel free to rebase your pull on that commit, if you need/want it.
shallow ACK
fad909a4f2, reviewed and played with it a bit, someone with more experience in this area should also review itcc @willcl-ark