From cbe869e15396df1975e08abd32736474b17207b0 Mon Sep 17 00:00:00 2001 From: Warren Togami Date: Fri, 18 Apr 2014 20:55:16 -1000 Subject: [PATCH] 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. --- src/bitcoinrpc.h | 1 - src/rpcwallet.cpp | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/bitcoinrpc.h b/src/bitcoinrpc.h index bf87ff4e3..cc791b0e9 100644 --- a/src/bitcoinrpc.h +++ b/src/bitcoinrpc.h @@ -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 diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 054753370..e1ce45014 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -1363,8 +1363,6 @@ Value walletpassphrase(const Array& params, bool fHelp) "Stores the wallet decryption key in memory for 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.");