|
|
@ -1271,7 +1271,7 @@ Value keypoolrefill(const Array& params, bool fHelp) |
|
|
|
unsigned int kpSize = max(GetArg("-keypool", 100), 0LL); |
|
|
|
unsigned int kpSize = max(GetArg("-keypool", 100), 0LL); |
|
|
|
if (params.size() > 0) { |
|
|
|
if (params.size() > 0) { |
|
|
|
if (params[0].get_int() < 0) |
|
|
|
if (params[0].get_int() < 0) |
|
|
|
throw JSONRPCError(-8, "Invalid parameter, expected valid size"); |
|
|
|
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, expected valid size"); |
|
|
|
kpSize = (unsigned int) params[0].get_int(); |
|
|
|
kpSize = (unsigned int) params[0].get_int(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1301,6 +1301,8 @@ Value walletpassphrase(const Array& params, bool fHelp) |
|
|
|
"Stores the wallet decryption key in memory for <timeout> seconds."); |
|
|
|
"Stores the wallet decryption key in memory for <timeout> seconds."); |
|
|
|
if (fHelp) |
|
|
|
if (fHelp) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
if (!fServer) |
|
|
|
|
|
|
|
throw JSONRPCError(RPC_SERVER_NOT_STARTED, "Error: RPC server was not started, use server=1 to change this."); |
|
|
|
if (!pwalletMain->IsCrypted()) |
|
|
|
if (!pwalletMain->IsCrypted()) |
|
|
|
throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrase was called."); |
|
|
|
throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrase was called."); |
|
|
|
|
|
|
|
|
|
|
|