Skip to content

Commit b2fed38

Browse files
authored
A few trivial fixes for RPCs (#3196)
* Move "bip147" softfork up in getblockchaininfo to match the actual order of activation * Fix typo * Use CURRENCY_UNIT instead of BTC * Add simple descriptions in `quorum` rpcs * Unify the look of `quorum` cmd options (drop `.`) * Clarify the order softforks are sorted in getblockchaininfo
1 parent f829636 commit b2fed38

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

src/rpc/blockchain.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,14 +1450,16 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
14501450
CBlockIndex* tip = chainActive.Tip();
14511451
UniValue softforks(UniValue::VARR);
14521452
UniValue bip9_softforks(UniValue::VOBJ);
1453+
// sorted by activation block
14531454
softforks.push_back(SoftForkDesc("bip34", 2, tip, consensusParams));
14541455
softforks.push_back(SoftForkDesc("bip66", 3, tip, consensusParams));
14551456
softforks.push_back(SoftForkDesc("bip65", 4, tip, consensusParams));
1457+
// sorted by start time/bit
14561458
BIP9SoftForkDescPushBack(bip9_softforks, "csv", consensusParams, Consensus::DEPLOYMENT_CSV);
14571459
BIP9SoftForkDescPushBack(bip9_softforks, "dip0001", consensusParams, Consensus::DEPLOYMENT_DIP0001);
1460+
BIP9SoftForkDescPushBack(bip9_softforks, "bip147", consensusParams, Consensus::DEPLOYMENT_BIP147);
14581461
BIP9SoftForkDescPushBack(bip9_softforks, "dip0003", consensusParams, Consensus::DEPLOYMENT_DIP0003);
14591462
BIP9SoftForkDescPushBack(bip9_softforks, "dip0008", consensusParams, Consensus::DEPLOYMENT_DIP0008);
1460-
BIP9SoftForkDescPushBack(bip9_softforks, "bip147", consensusParams, Consensus::DEPLOYMENT_BIP147);
14611463
obj.push_back(Pair("softforks", softforks));
14621464
obj.push_back(Pair("bip9_softforks", bip9_softforks));
14631465

src/rpc/masternode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ UniValue getprivatesendinfo(const JSONRPCRequest& request)
113113
" \"multisession\": true|false, (bool) Whether PrivateSend Multisession option is enabled\n"
114114
" \"max_sessions\": xxx, (numeric) How many parallel mixing sessions can there be at once\n"
115115
" \"max_rounds\": xxx, (numeric) How many rounds to mix\n"
116-
" \"max_amount\": xxx, (numeric) How many " + CURRENCY_UNIT + " to keep anonimized\n"
116+
" \"max_amount\": xxx, (numeric) How many " + CURRENCY_UNIT + " to keep anonymized\n"
117117
" \"max_denoms\": xxx, (numeric) How many inputs of each denominated amount to create\n"
118118
" \"queue_size\": xxx, (numeric) How many queues there are currently on the network\n"
119119
" \"sessions\": (array of json objects)\n"

src/rpc/mining.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ UniValue estimaterawfee(const JSONRPCRequest& request)
908908
"\nResult:\n"
909909
"{\n"
910910
" \"short\" : { (json object, optional) estimate for short time horizon\n"
911-
" \"feerate\" : x.x, (numeric, optional) estimate fee-per-kilobyte (in BTC)\n"
911+
" \"feerate\" : x.x, (numeric, optional) estimate fee-per-kilobyte (in " + CURRENCY_UNIT + ")\n"
912912
" \"decay\" : x.x, (numeric) exponential decay (per block) for historical moving average of confirmation data\n"
913913
" \"scale\" : x, (numeric) The resolution of confirmation targets at this time horizon\n"
914914
" \"pass\" : { (json object, optional) information about the lowest range of feerates to succeed in meeting the threshold\n"

src/rpc/rpcquorums.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ void quorum_list_help()
1616
{
1717
throw std::runtime_error(
1818
"quorum list ( count )\n"
19+
"List of on-chain quorums\n"
1920
"\nArguments:\n"
2021
"1. count (number, optional) Number of quorums to list. Will list active quorums\n"
2122
" if \"count\" is not specified.\n"
@@ -69,6 +70,7 @@ void quorum_info_help()
6970
{
7071
throw std::runtime_error(
7172
"quorum info llmqType \"quorumHash\" ( includeSkShare )\n"
73+
"Return information about a quorum\n"
7274
"\nArguments:\n"
7375
"1. llmqType (int, required) LLMQ type.\n"
7476
"2. \"quorumHash\" (string, required) Block hash of quorum.\n"
@@ -254,6 +256,7 @@ void quorum_sign_help()
254256
{
255257
throw std::runtime_error(
256258
"quorum sign llmqType \"id\" \"msgHash\"\n"
259+
"Threshold-sign a message\n"
257260
"\nArguments:\n"
258261
"1. llmqType (int, required) LLMQ type.\n"
259262
"2. \"id\" (string, required) Request id.\n"
@@ -265,6 +268,7 @@ void quorum_hasrecsig_help()
265268
{
266269
throw std::runtime_error(
267270
"quorum hasrecsig llmqType \"id\" \"msgHash\"\n"
271+
"Test if a valid recovered signature is present\n"
268272
"\nArguments:\n"
269273
"1. llmqType (int, required) LLMQ type.\n"
270274
"2. \"id\" (string, required) Request id.\n"
@@ -276,6 +280,7 @@ void quorum_getrecsig_help()
276280
{
277281
throw std::runtime_error(
278282
"quorum getrecsig llmqType \"id\" \"msgHash\"\n"
283+
"Get a recovered signature\n"
279284
"\nArguments:\n"
280285
"1. llmqType (int, required) LLMQ type.\n"
281286
"2. \"id\" (string, required) Request id.\n"
@@ -287,6 +292,7 @@ void quorum_isconflicting_help()
287292
{
288293
throw std::runtime_error(
289294
"quorum isconflicting llmqType \"id\" \"msgHash\"\n"
295+
"Test if a conflict exists\n"
290296
"\nArguments:\n"
291297
"1. llmqType (int, required) LLMQ type.\n"
292298
"2. \"id\" (string, required) Request id.\n"
@@ -384,7 +390,7 @@ UniValue quorum_dkgsimerror(const JSONRPCRequest& request)
384390
"\nAvailable commands:\n"
385391
" list - List of on-chain quorums\n"
386392
" info - Return information about a quorum\n"
387-
" dkgsimerror - Simulates DKG errors and malicious behavior.\n"
393+
" dkgsimerror - Simulates DKG errors and malicious behavior\n"
388394
" dkgstatus - Return the status of the current DKG process\n"
389395
" memberof - Checks which quorums the given masternode is a member of\n"
390396
" sign - Threshold-sign a message\n"

0 commit comments

Comments
 (0)