aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-01-17 16:32:35 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-01-17 16:55:20 +0100
commita8db31c83d6a43e07f741f7f61b1bf0df87621c7 (patch)
tree696736b13dd4e6bce111c92c93037dd3d747135d /src/qt/bitcoin.cpp
parent08ede8ef5edd8bfe6b80d0900bd9bd65b2d45cbf (diff)
qt: allow `walletpassphrase` in debug console without -server
Currently it is only possible to use `walletpassphrase` to unlock the wallet when bitcoin is started in server mode. Almost everything that manipulates the wallet in the RPC console needs the wallet to be unlocked and is thus unusable without -server. This is pretty unintuitive to me, and I'm sure it's even more confusing to users. Solve this with a very minimal change: by making the GUI start a dummy RPC thread just to handle timeouts.
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 3cf7e53c02..9b0b1d6e43 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -21,6 +21,7 @@
#include "init.h"
#include "main.h"
+#include "rpcserver.h"
#include "ui_interface.h"
#include "util.h"
#include "wallet.h"
@@ -227,6 +228,13 @@ void BitcoinCore::initialize()
{
LogPrintf("Running AppInit2 in thread\n");
int rv = AppInit2(threadGroup);
+ if(rv)
+ {
+ /* Start a dummy RPC thread if no RPC thread is active yet
+ * to handle timeouts.
+ */
+ StartDummyRPCThread();
+ }
emit initializeResult(rv);
} catch (std::exception& e) {
handleRunawayException(&e);