Revert "RPC: prevent crash with walletpassphrase"
This crash seemed to have never happened in 0.8.x, and we are missing the later commit in a8db31c83d6a43e07f741f7f61b1bf0df87621c7 so it seems better to just revert this. This reverts commit 036a69c13c06670b46d3c02cb47e3fc7b2487854.
This commit is contained in:
parent
9ec7b25cd6
commit
cbe869e153
@ -49,7 +49,6 @@ enum RPCErrorCode
|
||||
RPC_INVALID_PARAMETER = -8, // Invalid, missing or duplicate parameter
|
||||
RPC_DATABASE_ERROR = -20, // Database error
|
||||
RPC_DESERIALIZATION_ERROR = -22, // Error parsing or validating structure in raw format
|
||||
RPC_SERVER_NOT_STARTED = -18, // RPC server was not started (StartRPCThreads() not called)
|
||||
|
||||
// P2P client errors
|
||||
RPC_CLIENT_NOT_CONNECTED = -9, // Bitcoin is not connected
|
||||
|
||||
@ -1363,8 +1363,6 @@ Value walletpassphrase(const Array& params, bool fHelp)
|
||||
"Stores the wallet decryption key in memory for <timeout> seconds.");
|
||||
if (fHelp)
|
||||
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())
|
||||
throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrase was called.");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user