aboutsummaryrefslogtreecommitdiff
path: root/src/httprpc.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-09-07 12:36:53 -0400
committerJohn Newbery <john@johnnewbery.com>2018-09-10 14:27:32 -0400
commit7d038dcb41d93ea0b7401140998225adaab8c065 (patch)
tree88b3a490c0e0b3f8649b22f892be60f60d2f6088 /src/httprpc.cpp
parent3076556cd0317f7a05fd6836133dd6c051c4b53f (diff)
downloadbitcoin-7d038dcb41d93ea0b7401140998225adaab8c065.tar.xz
[build] remove ENABLE_WALLET ifdef from httprpc.cpp
Diffstat (limited to 'src/httprpc.cpp')
-rw-r--r--src/httprpc.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp
index 38f6e79643..43d8c4cbbf 100644
--- a/src/httprpc.cpp
+++ b/src/httprpc.cpp
@@ -14,6 +14,7 @@
#include <util.h>
#include <utilstrencodings.h>
#include <ui_interface.h>
+#include <walletinitinterface.h>
#include <crypto/hmac_sha256.h>
#include <stdio.h>
@@ -240,10 +241,9 @@ bool StartHTTPRPC()
return false;
RegisterHTTPHandler("/", true, HTTPReq_JSONRPC);
-#ifdef ENABLE_WALLET
- // ifdef can be removed once we switch to better endpoint support and API versioning
- RegisterHTTPHandler("/wallet/", false, HTTPReq_JSONRPC);
-#endif
+ if (g_wallet_init_interface.HasWalletSupport()) {
+ RegisterHTTPHandler("/wallet/", false, HTTPReq_JSONRPC);
+ }
struct event_base* eventBase = EventBase();
assert(eventBase);
httpRPCTimerInterface = MakeUnique<HTTPRPCTimerInterface>(eventBase);
@@ -260,9 +260,9 @@ void StopHTTPRPC()
{
LogPrint(BCLog::RPC, "Stopping HTTP RPC server\n");
UnregisterHTTPHandler("/", true);
-#ifdef ENABLE_WALLET
- UnregisterHTTPHandler("/wallet/", false);
-#endif
+ if (g_wallet_init_interface.HasWalletSupport()) {
+ UnregisterHTTPHandler("/wallet/", false);
+ }
if (httpRPCTimerInterface) {
RPCUnsetTimerInterface(httpRPCTimerInterface.get());
httpRPCTimerInterface.reset();