Fix:
- Incorrectly named fields
- Add missing ones
- Add missing optional flag
Fix:
For reference, if someone wants to export the RPC docs to produce a rendered diff, the following patch might be useful:
(dump_dir is a directory created by git init
)
0diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp
1index cf80b08b96..6c6a71c6e4 100644
2--- a/src/rpc/server.cpp
3+++ b/src/rpc/server.cpp
4@@ -95,7 +95,7 @@ std::string CRPCTable::help(const std::string& strCommand, const JSONRPCRequest&
5 {
6 const CRPCCommand *pcmd = command.second;
7 std::string strMethod = pcmd->name;
8- if ((strCommand != "" || pcmd->category == "hidden") && strMethod != strCommand)
9+ if ((strCommand != "") && strMethod != strCommand)
10 continue;
11 jreq.strMethod = strMethod;
12 try
13diff --git a/test/functional/rpc_help.py b/test/functional/rpc_help.py
14index de21f43747..753ee771ad 100755
15--- a/test/functional/rpc_help.py
16+++ b/test/functional/rpc_help.py
17@@ -100,7 +100,7 @@ class HelpRpcTest(BitcoinTestFramework):
18 # command titles
19 titles = [line[3:-3] for line in node.help().splitlines() if line.startswith('==')]
20
21- components = ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util']
22+ components = ['Blockchain', 'Control', 'Generating', 'Hidden', 'Mining', 'Network', 'Rawtransactions', 'Util']
23
24 if self.is_wallet_compiled():
25 components.append('Wallet')
26@@ -116,7 +116,8 @@ class HelpRpcTest(BitcoinTestFramework):
27 def dump_help(self):
28 dump_dir = os.path.join(self.options.tmpdir, 'rpc_help_dump')
29 os.mkdir(dump_dir)
30- calls = [line.split(' ', 1)[0] for line in self.nodes[0].help().splitlines() if line and not line.startswith('==')]
31+ dump_dir = '/tmp/temp_git/' ##HACK
32+ calls = [line.split(' ', 1)[0].split('|', 1)[0] for line in self.nodes[0].help().splitlines() if line and not line.startswith('==')]
33 for call in calls:
34 with open(os.path.join(dump_dir, call), 'w', encoding='utf-8') as f:
35 # Make sure the node can generate the help at runtime without crashing
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
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.
1082@@ -1078,22 +1083,23 @@ static RPCHelpMan decodepsbt()
1083 }},
decodepsbt
, looks like scriptPubKey
-> address
should also be marked optional.
3428@@ -3426,6 +3429,10 @@ RPCHelpMan signrawtransactionwithwallet()
3429 {
3430 {RPCResult::Type::STR_HEX, "txid", "The hash of the referenced, previous transaction"},
3431 {RPCResult::Type::NUM, "vout", "The index of the output to spent and used as input"},
3432+ {RPCResult::Type::ARR, "witness", "",
signrawtransactionwithkey()
as well?
141+ {RPCResult::Type::NUM, "pingtime", /* optional */ true, "ping time (if available)"},
142+ {RPCResult::Type::NUM, "minping", /* optional */ true, "minimum observed ping time (if any at all)"},
143+ {RPCResult::Type::NUM, "pingwait", /* optional */ true, "ping wait (if non-zero)"},
144 {RPCResult::Type::NUM, "version", "The peer version, such as 70001"},
145 {RPCResult::Type::STR, "subver", "The string version"},
146 {RPCResult::Type::BOOL, "inbound", "Inbound (true) or Outbound (false)"},
startingheight
, synced_headers
, synced_blocks
…. addr_rate_limited
be optional as well? They are dependant on fStateStats
same as pingwait.