Skip to content

Commit 8408b79

Browse files
fix help man
1 parent 75499e7 commit 8408b79

12 files changed

Lines changed: 227 additions & 99 deletions

File tree

src/rpc/blockchain.cpp

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

src/rpc/mining.cpp

Lines changed: 5 additions & 5 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"},
@@ -1556,7 +1556,7 @@ static RPCHelpMan consumecompactsketch()
15561556
{
15571557
{RPCResult::Type::STR_HEX, "blockhex", "The filled block hex. Only returns when block is final"},
15581558
{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"},
1559+
{RPCResult::Type::STR_HEX, "found_transactions", "The serialized list of found transactions to be used in finalizecompactblock"},
15601560
},
15611561
},
15621562
RPCExamples{
@@ -1624,8 +1624,8 @@ static RPCHelpMan consumegetblocktxn()
16241624
return RPCHelpMan{"consumegetblocktxn",
16251625
"Consumes a transaction request for a compact block sketch.",
16261626
{
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."},
1627+
{"full_block", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialized block that corresponds to the block request `block_tx_req`."},
1628+
{"block_tx_req", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "Hex serialized BlockTransactionsRequest, aka getblocktxn network message."},
16291629
},
16301630
RPCResult{
16311631
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)