Skip to content

Commit dee90f2

Browse files
authored
Merge pull request #1549 from RuslanProgrammer/man-help-update
fix help man
2 parents 27c2fb6 + fecf4f1 commit dee90f2

13 files changed

Lines changed: 359 additions & 169 deletions

src/rpc/blockchain.cpp

Lines changed: 65 additions & 43 deletions
Large diffs are not rendered by default.

src/rpc/mining.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ static RPCHelpMan getmininginfo()
441441
{RPCResult::Type::NUM, "blocks", "The current block"},
442442
{RPCResult::Type::NUM, "currentblockweight", /*optional=*/true, "The block weight of the last assembled block (only present if a block was ever assembled)"},
443443
{RPCResult::Type::NUM, "currentblocktx", /*optional=*/true, "The number of block transactions of the last assembled block (only present if a block was ever assembled)"},
444-
{RPCResult::Type::NUM, "difficulty", "The current difficulty"},
445-
{RPCResult::Type::NUM, "networkhashps", "The network hashes per second"},
444+
{RPCResult::Type::NUM, "difficulty", /*optional=*/true, "The current difficulty"},
445+
{RPCResult::Type::NUM, "networkhashps", /*optional=*/true, "The network hashes per second"},
446446
{RPCResult::Type::NUM, "pooledtx", "The size of the mempool"},
447447
{RPCResult::Type::STR, "chain", "current network name (main, test, signet, regtest, liquidv1, liquidv1test, liquidtestnet)"},
448448
{RPCResult::Type::STR, "warnings", "any network and blockchain warnings"},
@@ -556,11 +556,10 @@ static RPCHelpMan getblocktemplate()
556556
{"template_request", RPCArg::Type::OBJ, RPCArg::Default{UniValue::VOBJ}, "Format of the template",
557557
{
558558
{"mode", RPCArg::Type::STR, /* treat as named arg */ RPCArg::Optional::OMITTED_NAMED_ARG, "This must be set to \"template\", \"proposal\" (see BIP 23), or omitted"},
559-
{"capabilities", RPCArg::Type::ARR, /* treat as named arg */ RPCArg::Optional::OMITTED_NAMED_ARG, "A list of strings",
560-
{
561-
{"str", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "client side supported feature, 'longpoll', 'coinbasevalue', 'proposal', 'serverlist', 'workid'"},
562-
}},
563-
{"rules", RPCArg::Type::ARR, RPCArg::Optional::NO, "A list of strings",
559+
{"longpollid", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "The longpollid from a previous template to wait for an update"},
560+
{"data", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED_NAMED_ARG, "The hex-encoded block data to validate when mode is \"proposal\" (see BIP 23)"},
561+
{"maxversion", RPCArg::Type::NUM, RPCArg::Optional::OMITTED_NAMED_ARG, "Legacy maximum block version. Used only when \"rules\" is not provided"},
562+
{"rules", RPCArg::Type::ARR, RPCArg::Optional::OMITTED_NAMED_ARG, "A list of strings",
564563
{
565564
{"segwit", RPCArg::Type::STR, RPCArg::Optional::NO, "(literal) indicates client side segwit support"},
566565
{"str", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "other client side supported softfork deployment"},
@@ -1556,7 +1555,7 @@ static RPCHelpMan consumecompactsketch()
15561555
{
15571556
{RPCResult::Type::STR_HEX, "blockhex", "The filled block hex. Only returns when block is final"},
15581557
{RPCResult::Type::STR_HEX, "block_tx_req", "The serialized structure of missing transaction indices, given to serving node"},
1559-
{RPCResult::Type::STR_HEX, "found_tranasctions", "The serialized list of found transactions to be used in finalizecompactblock"},
1558+
{RPCResult::Type::STR_HEX, "found_transactions", "The serialized list of found transactions to be used in finalizecompactblock"},
15601559
},
15611560
},
15621561
RPCExamples{
@@ -1624,8 +1623,8 @@ static RPCHelpMan consumegetblocktxn()
16241623
return RPCHelpMan{"consumegetblocktxn",
16251624
"Consumes a transaction request for a compact block sketch.",
16261625
{
1627-
{"full_block", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialied block that corresponds to the block request `block_tx_req`."},
1628-
{"block_tx_req", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialied BlockTransactionsRequest, aka getblocktxn network message."},
1626+
{"full_block", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialized block that corresponds to the block request `block_tx_req`."},
1627+
{"block_tx_req", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialized BlockTransactionsRequest, aka getblocktxn network message."},
16291628
},
16301629
RPCResult{
16311630
RPCResult::Type::STR_HEX, "block_transactions", "The serialized list of found transactions aka BlockTransactions",

src/rpc/misc.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,8 @@ static RPCHelpMan tweakfedpegscript()
851851
RPCResult::Type::OBJ, "", "",
852852
{
853853
{RPCResult::Type::STR_HEX, "script", "The fedpegscript tweaked with claim_script"},
854-
{RPCResult::Type::STR, "address", "The address corresponding to the tweaked fedpegscript"},
854+
{RPCResult::Type::STR, "p2wsh", "Native segwit address (P2WSH) for the tweaked fedpegscript"},
855+
{RPCResult::Type::STR, "p2shwsh", "Wrapped segwit address (P2SH-P2WSH) for the tweaked fedpegscript"},
855856
}
856857
},
857858
RPCExamples{""},
@@ -918,9 +919,11 @@ static RPCHelpMan getpakinfo()
918919
RPCResult{
919920
RPCResult::Type::OBJ, "", "",
920921
{
921-
{RPCResult::Type::ARR, "block_paklist", "The PAK list loaded from latest epoch",
922+
{RPCResult::Type::OBJ, "block_paklist", "The PAK list loaded from the latest epoch",
922923
{
923-
{RPCResult::Type::ELISION, "", ""}
924+
{RPCResult::Type::ARR, "online", "Online keys (hex-encoded)", {{RPCResult::Type::STR_HEX, "", ""}}},
925+
{RPCResult::Type::ARR, "offline", "Offline keys (hex-encoded)", {{RPCResult::Type::STR_HEX, "", ""}}},
926+
{RPCResult::Type::BOOL, "reject", "True when there are no offline keys (reject pegouts)"},
924927
}},
925928
}
926929
},
@@ -976,12 +979,14 @@ static RPCHelpMan calcfastmerkleroot()
976979
static RPCHelpMan dumpassetlabels()
977980
{
978981
return RPCHelpMan{"dumpassetlabels",
979-
"\nLists all known asset id/label pairs in this wallet. This list can be modified with `-assetdir` configuration argument.\n",
982+
"\nLists all known asset label/id pairs for this node. Object keys are asset labels and values are hex-encoded asset identifiers. This list can be modified with the `-assetdir` configuration argument.\n",
980983
{},
981984
RPCResult{
982-
RPCResult::Type::OBJ, "labels", "",
985+
RPCResult::Type::OBJ_DYN,
986+
"",
987+
"Map from asset label (object key) to asset id (hex string value)",
983988
{
984-
{RPCResult::Type::ELISION, "", "the label for each asset id"},
989+
{RPCResult::Type::STR_HEX, "xxxx", "asset id for the label named by each dynamic object key"},
985990
},
986991
},
987992
RPCExamples{
@@ -1050,7 +1055,7 @@ static RPCHelpMan createblindedaddress()
10501055
{"blinding_key", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The blinding public key. This can be obtained for a given address using `getaddressinfo` (`confidential_key` field)."},
10511056
},
10521057
RPCResult{
1053-
RPCResult::Type::STR, "blinded_address", "The blinded address"
1058+
RPCResult::Type::STR, "", "The blinded address string"
10541059
},
10551060
RPCExamples{
10561061
"\nCreate a blinded address\n"

src/rpc/net.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -580,17 +580,17 @@ static RPCHelpMan getnetworkinfo()
580580
{RPCResult::Type::NUM, "version", "the server version"},
581581
{RPCResult::Type::STR, "subversion", "the server subversion string"},
582582
{RPCResult::Type::NUM, "protocolversion", "the protocol version"},
583-
{RPCResult::Type::STR_HEX, "localservices", "the services we offer to the network"},
584-
{RPCResult::Type::ARR, "localservicesnames", "the services we offer to the network, in human-readable form",
583+
{RPCResult::Type::STR_HEX, "localservices", /*optional=*/true, "the services we offer to the network"},
584+
{RPCResult::Type::ARR, "localservicesnames", /*optional=*/true, "the services we offer to the network, in human-readable form",
585585
{
586586
{RPCResult::Type::STR, "SERVICE_NAME", "the service name"},
587587
}},
588-
{RPCResult::Type::BOOL, "localrelay", "true if transaction relay is requested from peers"},
588+
{RPCResult::Type::BOOL, "localrelay", /*optional=*/true, "true if transaction relay is requested from peers"},
589589
{RPCResult::Type::NUM, "timeoffset", "the time offset"},
590-
{RPCResult::Type::NUM, "connections", "the total number of connections"},
591-
{RPCResult::Type::NUM, "connections_in", "the number of inbound connections"},
592-
{RPCResult::Type::NUM, "connections_out", "the number of outbound connections"},
593-
{RPCResult::Type::BOOL, "networkactive", "whether p2p networking is enabled"},
590+
{RPCResult::Type::NUM, "connections", /*optional=*/true, "the total number of connections"},
591+
{RPCResult::Type::NUM, "connections_in", /*optional=*/true, "the number of inbound connections"},
592+
{RPCResult::Type::NUM, "connections_out", /*optional=*/true, "the number of outbound connections"},
593+
{RPCResult::Type::BOOL, "networkactive", /*optional=*/true, "whether p2p networking is enabled"},
594594
{RPCResult::Type::ARR, "networks", "information per network",
595595
{
596596
{RPCResult::Type::OBJ, "", "",

0 commit comments

Comments
 (0)