-
Notifications
You must be signed in to change notification settings - Fork 1.2k
backport: bitcoin/bitcoin#23083: rpc: Fail to return undocumented or misdocumented JSON #7502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -427,17 +427,17 @@ static RPCHelpMan getcoinjoininfo() | |
| {RPCResult::Type::NUM, "max_amount", "Target CoinJoin balance in " + CURRENCY_UNIT + ""}, | ||
| {RPCResult::Type::NUM, "denoms_goal", "How many inputs of each denominated amount to target"}, | ||
| {RPCResult::Type::NUM, "denoms_hardcap", "Maximum limit of how many inputs of each denominated amount to create"}, | ||
| {RPCResult::Type::NUM, "queue_size", "How many queues there are currently on the network"}, | ||
| {RPCResult::Type::BOOL, "running", "Whether mixing is currently running"}, | ||
| {RPCResult::Type::NUM, "queue_size", /*optional=*/true, "How many queues there are currently on the network"}, | ||
| {RPCResult::Type::BOOL, "running", /*optional=*/true, "Whether mixing is currently running (not returned when no wallet is loaded)"}, | ||
| {RPCResult::Type::NUM, "pending_inputs", "The number of successfully mixed inputs kept locked until the transaction spending them is observed"}, | ||
|
Comment on lines
+431
to
432
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| {RPCResult::Type::ARR, "sessions", "", | ||
| {RPCResult::Type::ARR, "sessions", /*optional=*/true, "Not returned when no wallet is loaded", | ||
| { | ||
| {RPCResult::Type::OBJ, "", "", | ||
| { | ||
| {RPCResult::Type::STR_HEX, "protxhash", "The ProTxHash of the masternode"}, | ||
| GetRpcResult("outpoint"), | ||
| {RPCResult::Type::STR, "service", "The IP address and port of the masternode (DEPRECATED, returned only if config option -deprecatedrpc=service is passed)"}, | ||
| {RPCResult::Type::ARR, "addrs_core_p2p", "Network addresses of the masternode used for protocol P2P", | ||
| {RPCResult::Type::STR_HEX, "protxhash", /*optional=*/true, "The ProTxHash of the masternode (only while connected to one)"}, | ||
| GetRpcResult("outpoint", /*optional=*/true), | ||
| {RPCResult::Type::STR, "service", /*optional=*/true, "The IP address and port of the masternode (DEPRECATED, returned only if config option -deprecatedrpc=service is passed)"}, | ||
| {RPCResult::Type::ARR, "addrs_core_p2p", /*optional=*/true, "Network addresses of the masternode used for protocol P2P", | ||
| { | ||
| {RPCResult::Type::STR, "address", ""}, | ||
| } | ||
|
|
@@ -448,7 +448,7 @@ static RPCHelpMan getcoinjoininfo() | |
| }}, | ||
| }}, | ||
| {RPCResult::Type::NUM, "keys_left", /*optional=*/true, "How many new keys are left since last automatic backup (if applicable)"}, | ||
| {RPCResult::Type::STR, "warnings", "Warnings if any"}, | ||
| {RPCResult::Type::STR, "warnings", /*optional=*/true, "Warnings if any (not returned when no wallet is loaded)"}, | ||
| }}, | ||
| RPCResult{"for masternodes", | ||
| RPCResult::Type::OBJ, "", "", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1513,12 +1513,11 @@ static RPCHelpMan protx_list() | |
| RPCResult{ | ||
| RPCResult::Type::ARR, "", "List of masternodes", | ||
| { | ||
| RPCResult{"when detailed=false", RPCResult::Type::STR, "", "ProTx hash"}, | ||
| RPCResult{"when detailed=true", RPCResult::Type::OBJ, "", "", | ||
| { | ||
| // TODO: document fields of the detailed entry | ||
| {RPCResult::Type::ELISION, "", ""} | ||
| }}, | ||
| // Array elements are matched against this doc by index, so the two shapes | ||
| // cannot be listed as alternatives here - the first entry would be applied | ||
| // to element 0 only and the second to every element after it. | ||
| // TODO: document fields of the detailed entry | ||
| {RPCResult::Type::ANY, "", "The ProTx hash when detailed=false, otherwise an object describing the masternode"}, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When users request help for Useful? React with 👍 / 👎. |
||
| }}, | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| RPCExamples{""}, | ||
| [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue | ||
|
|
@@ -1772,11 +1771,11 @@ static RPCHelpMan protx_listdiff() | |
| {RPCResult::Type::NUM, "blockHeight", "Height of target (ending) block"}, | ||
| {RPCResult::Type::ARR, "addedMNs", "Added masternodes", | ||
| {CDeterministicMN::GetJsonHelp(/*key=*/"", /*optional=*/false)}}, | ||
| {RPCResult::Type::ARR, "removedMns", "Removed masternodes", | ||
| {RPCResult::Type::ARR, "removedMNs", "Removed masternodes", | ||
| {{RPCResult::Type::STR_HEX, "protx", "ProTx of removed masternode"}}}, | ||
| {RPCResult::Type::ARR, "updatedMNs", "Updated masternodes", | ||
| {{RPCResult::Type::OBJ, "<protx_hash>", "", | ||
| {CDeterministicMNStateDiff::GetJsonHelp(/*key=*/"", /*optional=*/false)}}}}, | ||
| {{RPCResult::Type::OBJ_DYN, "", "json object with ProTx hash as keys", | ||
| {CDeterministicMNStateDiff::GetJsonHelp(/*key=*/"<protx_hash>", /*optional=*/false)}}}}, | ||
| }, | ||
| }, | ||
| RPCExamples{""}, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.