diff options
| author | MarcoFalke <[email protected]> | 2018-09-11 09:46:35 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2018-09-11 09:46:42 -0400 |
| commit | 4103cc31690e5be21854a9628f57c54b880ee195 (patch) | |
| tree | 5566b3a45efb6ded37fec7a3d65dd03d65020a9a /src/httprpc.cpp | |
| parent | Merge #13734: gui: Drop boost::scoped_array and use wchar_t API explicitly on... (diff) | |
| parent | [build] remove ENABLE_WALLET ifdef from httprpc.cpp (diff) | |
| download | discoin-4103cc31690e5be21854a9628f57c54b880ee195.tar.xz discoin-4103cc31690e5be21854a9628f57c54b880ee195.zip | |
Merge #14168: Remove ENABLE_WALLET from libbitcoin_server.a
7d038dcb41 [build] remove ENABLE_WALLET ifdef from httprpc.cpp (John Newbery)
3076556cd0 [build] Move dummy wallet into its own .cpp file. (John Newbery)
Pull request description:
This removes the final instances of ENABLE_WALLET in libbitcoin_server and so completes #7965.
Tree-SHA512: a49128b7c17f4f69940d5843e6b785f08687efb377b5157d5b267d1205e596eb5c1966f1afb8ab36bcc2491c46252099e3e844c91f5623da8ded2e358d46338d
Diffstat (limited to 'src/httprpc.cpp')
| -rw-r--r-- | src/httprpc.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp index 38f6e7964..43d8c4cbb 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(); |