* no wallet passphrase in masternode(broadcast) and darksend rpc

* spork values are int64
This commit is contained in:
UdjinM6 2017-02-10 04:51:47 +04:00 committed by GitHub
parent fecb3e4fe6
commit b6be968c2f
2 changed files with 9 additions and 9 deletions

View File

@ -31,11 +31,13 @@ UniValue privatesend(const UniValue& params, bool fHelp)
" start - Start mixing\n" " start - Start mixing\n"
" stop - Stop mixing\n" " stop - Stop mixing\n"
" reset - Reset mixing\n" " reset - Reset mixing\n"
+ HelpRequiringPassphrase()); );
if(params[0].get_str() == "start") { if(params[0].get_str() == "start") {
if (pwalletMain->IsLocked(true)) {
throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please enter the wallet passphrase with walletpassphrase first."); LOCK(pwalletMain->cs_wallet);
EnsureWalletIsUnlocked();
}
if(fMasterNode) if(fMasterNode)
return "Mixing is not supported from masternodes"; return "Mixing is not supported from masternodes";
@ -103,11 +105,10 @@ UniValue masternode(const UniValue& params, bool fHelp)
strCommand != "debug" && strCommand != "current" && strCommand != "winner" && strCommand != "winners" && strCommand != "genkey" && strCommand != "debug" && strCommand != "current" && strCommand != "winner" && strCommand != "winners" && strCommand != "genkey" &&
strCommand != "connect" && strCommand != "outputs" && strCommand != "status")) strCommand != "connect" && strCommand != "outputs" && strCommand != "status"))
throw std::runtime_error( throw std::runtime_error(
"masternode \"command\"... ( \"passphrase\" )\n" "masternode \"command\"...\n"
"Set of commands to execute masternode related actions\n" "Set of commands to execute masternode related actions\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"command\" (string or set of strings, required) The command to execute\n" "1. \"command\" (string or set of strings, required) The command to execute\n"
"2. \"passphrase\" (string, optional) The wallet passphrase\n"
"\nAvailable commands:\n" "\nAvailable commands:\n"
" count - Print number of all known masternodes (optional: 'ps', 'enabled', 'all', 'qualify')\n" " count - Print number of all known masternodes (optional: 'ps', 'enabled', 'all', 'qualify')\n"
" current - Print info on current masternode winner to be paid the next block (calculated locally)\n" " current - Print info on current masternode winner to be paid the next block (calculated locally)\n"
@ -572,17 +573,16 @@ UniValue masternodebroadcast(const UniValue& params, bool fHelp)
if (fHelp || if (fHelp ||
(strCommand != "create-alias" && strCommand != "create-all" && strCommand != "decode" && strCommand != "relay")) (strCommand != "create-alias" && strCommand != "create-all" && strCommand != "decode" && strCommand != "relay"))
throw std::runtime_error( throw std::runtime_error(
"masternodebroadcast \"command\"... ( \"passphrase\" )\n" "masternodebroadcast \"command\"...\n"
"Set of commands to create and relay masternode broadcast messages\n" "Set of commands to create and relay masternode broadcast messages\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"command\" (string or set of strings, required) The command to execute\n" "1. \"command\" (string or set of strings, required) The command to execute\n"
"2. \"passphrase\" (string, optional) The wallet passphrase\n"
"\nAvailable commands:\n" "\nAvailable commands:\n"
" create-alias - Create single remote masternode broadcast message by assigned alias configured in masternode.conf\n" " create-alias - Create single remote masternode broadcast message by assigned alias configured in masternode.conf\n"
" create-all - Create remote masternode broadcast messages for all masternodes configured in masternode.conf\n" " create-all - Create remote masternode broadcast messages for all masternodes configured in masternode.conf\n"
" decode - Decode masternode broadcast message\n" " decode - Decode masternode broadcast message\n"
" relay - Relay masternode broadcast message to the network\n" " relay - Relay masternode broadcast message to the network\n"
+ HelpRequiringPassphrase()); );
if (strCommand == "create-alias") if (strCommand == "create-alias")
{ {

View File

@ -242,7 +242,7 @@ UniValue spork(const UniValue& params, bool fHelp)
} }
// SPORK VALUE // SPORK VALUE
int64_t nValue = params[1].get_int(); int64_t nValue = params[1].get_int64();
//broadcast new spork //broadcast new spork
if(sporkManager.UpdateSpork(nSporkID, nValue)){ if(sporkManager.UpdateSpork(nSporkID, nValue)){