mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:50:37 +00:00
rpc: fix getorphantxs verbosity help and type checking #36979
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!36979
Loading…
Reference in a new issue
No description provided.
Delete branch "l0rinc/getorphantxs-verbosity-help"
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?
Problem: #31043 removed the
verbosealias fromgetorphantxs, but all three result headings in its help still use that name. Passingverbose=1as the help suggests returnsUnknown named parameter verbose. The RPC also bypasses the schema’s numeric type check and reports a custom error for boolean inputs.Fix: Use
verbosityin all three result headings. Let the RPC schema check the argument type and supply its declared default of0. For boolean inputs, the RPC still returns error-3, now with the standard message identifying the argument by name and position.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.
A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
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.
I don't like skipping type checks, especially when there is a schema now. The schema or the server should take care of all of this, not each rpc method by itself.
Can you drop this?
Thanks @maflcko, I’ve applied your suggestion and expanded the PR to test that
getorphantxs(verbosity=1)omits tx hex and to remove the redundantallow_boolflag fromParseVerbosity.🔵 Suggestion · Boolean
options.verbosityrejection lacks test coverageAlthough
estimatesmartfeestill rejects booleanoptions.verbosity, the tests do not cover the check that now solely enforces that behavior.Location:
src/rpc/fees.cpp:122(head).Reviewed:
89445045a736· Review report · Previous reportspermalink
The ci/cli failure is fixed in https://github.com/bitcoin/bitcoin/pull/36976/commits (
ffff10c970)🚧 At least one of the CI tasks failed.
Task
Alpine (musl): https://github.com/bitcoin/bitcoin/actions/runs/45660194112/job/140644356512LLM reason (✨ experimental): functional_test_fail: The functional test
rpc_orphans.pyfailed.Hints
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
Intermittent network issues can occur; re-run CI for now, and report the issue if they keep happening.
A functional or integration test failure may be intermittent or unrelated to this pull request.
If no dedicated issue thread exists, create a new one to track it.
Leave a comment here, if you need help tracking down a confusing failure.
Rebased and cherry-picked @maflcko’s commit from #36976 to fix CI and applied Ralph's coverage suggestion.