aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r--src/bitcoind.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 58518d611f..0dc2dfbf7d 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -18,9 +18,6 @@
#include <httpserver.h>
#include <httprpc.h>
#include <utilstrencodings.h>
-#if ENABLE_WALLET
-#include <wallet/init.h>
-#endif
#include <walletinitinterface.h>
#include <boost/thread.hpp>
@@ -45,12 +42,9 @@
void WaitForShutdown()
{
- bool fShutdown = ShutdownRequested();
- // Tell the main threads to shutdown.
- while (!fShutdown)
+ while (!ShutdownRequested())
{
MilliSleep(200);
- fShutdown = ShutdownRequested();
}
Interrupt();
}
@@ -63,12 +57,6 @@ bool AppInit(int argc, char* argv[])
{
bool fRet = false;
-#if ENABLE_WALLET
- g_wallet_init_interface.reset(new WalletInit);
-#else
- g_wallet_init_interface.reset(new DummyWalletInit);
-#endif
-
//
// Parameters
//
@@ -111,7 +99,7 @@ bool AppInit(int argc, char* argv[])
}
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
try {
- SelectParams(ChainNameFromCommandLine());
+ SelectParams(gArgs.GetChainName());
} catch (const std::exception& e) {
fprintf(stderr, "Error: %s\n", e.what());
return false;
@@ -148,6 +136,10 @@ bool AppInit(int argc, char* argv[])
if (gArgs.GetBoolArg("-daemon", false))
{
#if HAVE_DECL_DAEMON
+#if defined(MAC_OSX)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
fprintf(stdout, "Bitcoin server starting\n");
// Daemonize
@@ -155,6 +147,9 @@ bool AppInit(int argc, char* argv[])
fprintf(stderr, "Error: daemon() failed: %s\n", strerror(errno));
return false;
}
+#if defined(MAC_OSX)
+#pragma GCC diagnostic pop
+#endif
#else
fprintf(stderr, "Error: -daemon is not supported on this operating system\n");
return false;