Align RPC help documentation with actual implementation.
rpc: help metadata fixes #35513
pull RuslanProgrammer wants to merge 2 commits into bitcoin:master from RuslanProgrammer:rpc-help-metadata-fixes changing 7 files +29 −35-
RuslanProgrammer commented at 12:16 PM on June 11, 2026: none
-
DrahtBot commented at 12:16 PM on June 11, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35513.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process. A summary of reviews will appear here.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #34628 (p2p: Replace per-peer transaction rate-limiting with global rate limits by ajtowns)
- #33741 (rpc: Optionally print feerates in sat/vb by polespinasa)
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.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
pinheadmz commented at 12:26 PM on June 11, 2026: member
Please squash your commits
- RuslanProgrammer force-pushed on Jun 11, 2026
- RuslanProgrammer force-pushed on Jun 11, 2026
- RuslanProgrammer force-pushed on Jun 11, 2026
- fanquake renamed this:
Rpc help metadata fixes
rpc: help metadata fixes
on Jun 11, 2026 - DrahtBot added the label RPC/REST/ZMQ on Jun 11, 2026
- sedited requested review from willcl-ark on Jun 16, 2026
- DrahtBot added the label Needs rebase on Jun 19, 2026
- RuslanProgrammer force-pushed on Jun 22, 2026
- DrahtBot removed the label Needs rebase on Jun 22, 2026
-
in src/rpc/blockchain.cpp:1608 in aadb3b5b03
1603 | @@ -1604,7 +1604,8 @@ static RPCMethod getchaintips() 1604 | "2. \"headers-only\" Not all blocks for this branch are available, but the headers are valid\n" 1605 | "3. \"valid-headers\" All blocks are available for this branch, but they were never fully validated\n" 1606 | "4. \"valid-fork\" This branch is not part of the active chain, but is fully validated\n" 1607 | - "5. \"active\" This is the tip of the active main chain, which is certainly valid"}, 1608 | + "5. \"active\" This is the tip of the active main chain, which is certainly valid\n" 1609 | + "6. \"unknown\" Status could not be determined"},
maflcko commented at 5:58 PM on June 30, 2026:Can you explain how to trigger this? This is uncovered code according to https://maflcko.github.io/b-c-cov/total.coverage/src/rpc/blockchain.cpp.gcov.html
RuslanProgrammer commented at 7:37 AM on July 1, 2026:Agree, there is no known trigger. I only added it to show what the implementation could theoretically return
willcl-ark commented at 8:03 AM on July 1, 2026:I don't think documenting something unreachable helps "align the docs" and this can be droped.
RuslanProgrammer commented at 8:16 AM on July 1, 2026:Removed
maflcko commented at 8:20 AM on July 1, 2026:Possibly this could be a
NONFATAL_UNREACHABLE, but I haven't looked closely.rpc: Fix inaccuracies in RPC help docs 91a9d229c5rpc: require connman in getnetworkinfo ac6a44be6ain src/rpc/net.cpp:665 in aadb3b5b03
668 | + {RPCResult::Type::BOOL, "localrelay", /*optional=*/true, "true if transaction relay is requested from peers"}, 669 | + {RPCResult::Type::NUM, "timeoffset", /*optional=*/true, "the time offset"}, 670 | + {RPCResult::Type::NUM, "connections", /*optional=*/true, "the total number of connections"}, 671 | + {RPCResult::Type::NUM, "connections_in", /*optional=*/true, "the number of inbound connections"}, 672 | + {RPCResult::Type::NUM, "connections_out", /*optional=*/true, "the number of outbound connections"}, 673 | + {RPCResult::Type::BOOL, "networkactive", /*optional=*/true, "whether p2p networking is enabled"},
maflcko commented at 6:02 PM on June 30, 2026:I think this is wrong/dead code.
The correct fix would be to just require connman. See
EnsureAnyin src/rpc/server_util.h
willcl-ark commented at 8:02 AM on July 1, 2026:In aadb3b5b033d2933640e86d38e7687793f931ddc
Agree, we should require
connman(andpeermanandmempool) using the helper(s).
RuslanProgrammer commented at 8:16 AM on July 1, 2026:Fixed
RuslanProgrammer force-pushed on Jul 1, 2026
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-07-09 06:47 UTC