Fix rpc param names

And corresponding locall variables too
This commit is contained in:
UdjinM6 2019-06-20 19:27:46 +03:00 committed by Pasta
parent 3dcbb2e599
commit badfdb451c
No known key found for this signature in database
GPG Key ID: D362C9F7142766AE
2 changed files with 15 additions and 15 deletions

View File

@ -47,20 +47,20 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "instantsendtoaddress", 4, "comment_to" },
{ "settxfee", 0, "amount" },
{ "getreceivedbyaddress", 1, "minconf" },
{ "getreceivedbyaddress", 2, "addlockconf" },
{ "getreceivedbyaddress", 2, "addlocked" },
{ "getreceivedbyaccount", 1, "minconf" },
{ "getreceivedbyaccount", 2, "addlockconf" },
{ "getreceivedbyaccount", 2, "addlocked" },
{ "listaddressbalances", 0, "minamount" },
{ "listreceivedbyaddress", 0, "minconf" },
{ "listreceivedbyaddress", 1, "addlockconf" },
{ "listreceivedbyaddress", 1, "addlocked" },
{ "listreceivedbyaddress", 2, "include_empty" },
{ "listreceivedbyaddress", 3, "include_watchonly" },
{ "listreceivedbyaccount", 0, "minconf" },
{ "listreceivedbyaccount", 1, "addlockconf" },
{ "listreceivedbyaccount", 1, "addlocked" },
{ "listreceivedbyaccount", 2, "include_empty" },
{ "listreceivedbyaccount", 3, "include_watchonly" },
{ "getbalance", 1, "minconf" },
{ "getbalance", 2, "addlockconf" },
{ "getbalance", 2, "addlocked" },
{ "getbalance", 3, "include_watchonly" },
{ "getchaintips", 0, "count" },
{ "getchaintips", 1, "branchlen" },
@ -74,12 +74,12 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "move", 3, "minconf" },
{ "sendfrom", 2, "amount" },
{ "sendfrom", 3, "minconf" },
{ "sendfrom", 4, "addlockconf" },
{ "sendfrom", 4, "addlocked" },
{ "listtransactions", 1, "count" },
{ "listtransactions", 2, "skip" },
{ "listtransactions", 3, "include_watchonly" },
{ "listaccounts", 0, "minconf" },
{ "listaccounts", 1, "addlockconf" },
{ "listaccounts", 1, "addlocked" },
{ "listaccounts", 2, "include_watchonly" },
{ "walletpassphrase", 1, "timeout" },
{ "walletpassphrase", 2, "mixingonly" },
@ -88,8 +88,8 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "listsinceblock", 2, "include_watchonly" },
{ "sendmany", 1, "amounts" },
{ "sendmany", 2, "minconf" },
{ "sendmany", 3, "addlockconf" },
{ "sendmany", 5, "subtractfeefromamount" },
{ "sendmany", 3, "addlocked" },
{ "sendmany", 5, "subtractfeefrom" },
{ "sendmany", 6, "use_is" },
{ "sendmany", 7, "use_ps" },
{ "addmultisigaddress", 0, "nrequired" },

View File

@ -1031,7 +1031,7 @@ UniValue sendmany(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 2 || request.params.size() > 8)
throw std::runtime_error(
"sendmany \"fromaccount\" {\"address\":amount,...} ( minconf addlocked \"comment\" [\"address\",...] subtractfeefromamount use_is use_ps )\n"
"sendmany \"fromaccount\" {\"address\":amount,...} ( minconf addlocked \"comment\" [\"address\",...] subtractfeefrom use_is use_ps )\n"
"\nSend multiple times. Amounts are double-precision floating point numbers."
+ HelpRequiringPassphrase(pwallet) + "\n"
"\nArguments:\n"
@ -1044,7 +1044,7 @@ UniValue sendmany(const JSONRPCRequest& request)
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
"4. addlocked (bool, optional, default=false) Whether to include transactions locked via InstantSend.\n"
"5. \"comment\" (string, optional) A comment\n"
"6. subtractfeefromamount (array, optional) A json array with addresses.\n"
"6. subtractfeefrom (array, optional) A json array with addresses.\n"
" The fee will be equally deducted from the amount of each selected address.\n"
" Those recipients will receive less dashs than you enter in their corresponding amount field.\n"
" If no addresses are specified here, the sender pays the fee.\n"
@ -1084,9 +1084,9 @@ UniValue sendmany(const JSONRPCRequest& request)
if (request.params.size() > 4 && !request.params[4].isNull() && !request.params[4].get_str().empty())
wtx.mapValue["comment"] = request.params[4].get_str();
UniValue subtractFeeFromAmount(UniValue::VARR);
UniValue subtractFeeFrom(UniValue::VARR);
if (request.params.size() > 5)
subtractFeeFromAmount = request.params[5].get_array();
subtractFeeFrom = request.params[5].get_array();
std::set<CBitcoinAddress> setAddress;
std::vector<CRecipient> vecSend;
@ -1110,8 +1110,8 @@ UniValue sendmany(const JSONRPCRequest& request)
totalAmount += nAmount;
bool fSubtractFeeFromAmount = false;
for (unsigned int idx = 0; idx < subtractFeeFromAmount.size(); idx++) {
const UniValue& addr = subtractFeeFromAmount[idx];
for (unsigned int idx = 0; idx < subtractFeeFrom.size(); idx++) {
const UniValue& addr = subtractFeeFrom[idx];
if (addr.get_str() == name_)
fSubtractFeeFromAmount = true;
}