Browse Source

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 a8db31c83d so it seems better to just revert this.

This reverts commit 036a69c13c.
0.8
Warren Togami 11 years ago
parent
commit
cbe869e153
  1. 1
      src/bitcoinrpc.h
  2. 2
      src/rpcwallet.cpp

1
src/bitcoinrpc.h

@ -49,7 +49,6 @@ enum RPCErrorCode @@ -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

2
src/rpcwallet.cpp

@ -1363,8 +1363,6 @@ Value walletpassphrase(const Array& params, bool fHelp) @@ -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…
Cancel
Save