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
This commit is contained in:
UdjinM6 2019-11-13 21:17:00 +03:00 committed by GitHub
parent f8296364aa
commit b2fed3862b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View File

@ -1450,14 +1450,16 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
CBlockIndex* tip = chainActive.Tip();
UniValue softforks(UniValue::VARR);
UniValue bip9_softforks(UniValue::VOBJ);
// sorted by activation block
softforks.push_back(SoftForkDesc("bip34", 2, tip, consensusParams));
softforks.push_back(SoftForkDesc("bip66", 3, tip, consensusParams));
softforks.push_back(SoftForkDesc("bip65", 4, tip, consensusParams));
// sorted by start time/bit
BIP9SoftForkDescPushBack(bip9_softforks, "csv", consensusParams, Consensus::DEPLOYMENT_CSV);
BIP9SoftForkDescPushBack(bip9_softforks, "dip0001", consensusParams, Consensus::DEPLOYMENT_DIP0001);
BIP9SoftForkDescPushBack(bip9_softforks, "bip147", consensusParams, Consensus::DEPLOYMENT_BIP147);
BIP9SoftForkDescPushBack(bip9_softforks, "dip0003", consensusParams, Consensus::DEPLOYMENT_DIP0003);
BIP9SoftForkDescPushBack(bip9_softforks, "dip0008", consensusParams, Consensus::DEPLOYMENT_DIP0008);
BIP9SoftForkDescPushBack(bip9_softforks, "bip147", consensusParams, Consensus::DEPLOYMENT_BIP147);
obj.push_back(Pair("softforks", softforks));
obj.push_back(Pair("bip9_softforks", bip9_softforks));

View File

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

View File

@ -908,7 +908,7 @@ UniValue estimaterawfee(const JSONRPCRequest& request)
"\nResult:\n"
"{\n"
" \"short\" : { (json object, optional) estimate for short time horizon\n"
" \"feerate\" : x.x, (numeric, optional) estimate fee-per-kilobyte (in BTC)\n"
" \"feerate\" : x.x, (numeric, optional) estimate fee-per-kilobyte (in " + CURRENCY_UNIT + ")\n"
" \"decay\" : x.x, (numeric) exponential decay (per block) for historical moving average of confirmation data\n"
" \"scale\" : x, (numeric) The resolution of confirmation targets at this time horizon\n"
" \"pass\" : { (json object, optional) information about the lowest range of feerates to succeed in meeting the threshold\n"

View File

@ -16,6 +16,7 @@ void quorum_list_help()
{
throw std::runtime_error(
"quorum list ( count )\n"
"List of on-chain quorums\n"
"\nArguments:\n"
"1. count (number, optional) Number of quorums to list. Will list active quorums\n"
" if \"count\" is not specified.\n"
@ -69,6 +70,7 @@ void quorum_info_help()
{
throw std::runtime_error(
"quorum info llmqType \"quorumHash\" ( includeSkShare )\n"
"Return information about a quorum\n"
"\nArguments:\n"
"1. llmqType (int, required) LLMQ type.\n"
"2. \"quorumHash\" (string, required) Block hash of quorum.\n"
@ -254,6 +256,7 @@ void quorum_sign_help()
{
throw std::runtime_error(
"quorum sign llmqType \"id\" \"msgHash\"\n"
"Threshold-sign a message\n"
"\nArguments:\n"
"1. llmqType (int, required) LLMQ type.\n"
"2. \"id\" (string, required) Request id.\n"
@ -265,6 +268,7 @@ void quorum_hasrecsig_help()
{
throw std::runtime_error(
"quorum hasrecsig llmqType \"id\" \"msgHash\"\n"
"Test if a valid recovered signature is present\n"
"\nArguments:\n"
"1. llmqType (int, required) LLMQ type.\n"
"2. \"id\" (string, required) Request id.\n"
@ -276,6 +280,7 @@ void quorum_getrecsig_help()
{
throw std::runtime_error(
"quorum getrecsig llmqType \"id\" \"msgHash\"\n"
"Get a recovered signature\n"
"\nArguments:\n"
"1. llmqType (int, required) LLMQ type.\n"
"2. \"id\" (string, required) Request id.\n"
@ -287,6 +292,7 @@ void quorum_isconflicting_help()
{
throw std::runtime_error(
"quorum isconflicting llmqType \"id\" \"msgHash\"\n"
"Test if a conflict exists\n"
"\nArguments:\n"
"1. llmqType (int, required) LLMQ type.\n"
"2. \"id\" (string, required) Request id.\n"
@ -384,7 +390,7 @@ UniValue quorum_dkgsimerror(const JSONRPCRequest& request)
"\nAvailable commands:\n"
" list - List of on-chain quorums\n"
" info - Return information about a quorum\n"
" dkgsimerror - Simulates DKG errors and malicious behavior.\n"
" dkgsimerror - Simulates DKG errors and malicious behavior\n"
" dkgstatus - Return the status of the current DKG process\n"
" memberof - Checks which quorums the given masternode is a member of\n"
" sign - Threshold-sign a message\n"