corrected stakin dialog + added rpc staking

This commit is contained in:
janko33bd
2018-02-03 23:16:28 +01:00
parent d0957c589d
commit 0cb80ee889
9 changed files with 27 additions and 7 deletions

View File

@@ -380,6 +380,12 @@ static void SendMoney(const CTxDestination &address, CAmount nValue, bool fSubtr
if (nValue > curBalance)
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds");
if (fWalletUnlockStakingOnly)
{
string strError = _("Error: Wallet unlocked for staking only, unable to create transaction.");
throw JSONRPCError(RPC_WALLET_ERROR, strError);
}
// Parse Bitcoin address
CScript scriptPubKey = GetScriptForDestination(address);
@@ -1885,7 +1891,7 @@ UniValue walletpassphrase(const UniValue& params, bool fHelp)
if (!EnsureWalletIsAvailable(fHelp))
return NullUniValue;
if (pwalletMain->IsCrypted() && (fHelp || params.size() != 2))
if (pwalletMain->IsCrypted() && (fHelp || params.size() < 2 || params.size() > 3))
throw runtime_error(
"walletpassphrase \"passphrase\" timeout\n"
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"