aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-11-29 12:44:14 +0100
committerWladimir J. van der Laan <[email protected]>2016-11-29 12:47:13 +0100
commitdeec83fd2cc8af39c28c74161650fbff432502ce (patch)
treed53458e5f5c4e386d9fcaf664dac62d9a4a33d07 /src
parentinit: Try to aquire datadir lock before and after daemonization (diff)
downloaddiscoin-deec83fd2cc8af39c28c74161650fbff432502ce.tar.xz
discoin-deec83fd2cc8af39c28c74161650fbff432502ce.zip
init: Get rid of fServer flag
There is no need to store this flag globally, the variable is only used inside the initialization process. Thanks to Alex Morcos for the idea.
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp4
-rw-r--r--src/util.cpp1
-rw-r--r--src/util.h1
3 files changed, 1 insertions, 5 deletions
diff --git a/src/init.cpp b/src/init.cpp
index b70e6e915..fb51eb763 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -931,8 +931,6 @@ bool AppInitParameterInteraction()
else if (nScriptCheckThreads > MAX_SCRIPTCHECK_THREADS)
nScriptCheckThreads = MAX_SCRIPTCHECK_THREADS;
- fServer = GetBoolArg("-server", false);
-
// block pruning; get the amount of disk space (in MiB) to allot for block & undo files
int64_t nSignedPruneTarget = GetArg("-prune", 0) * 1024 * 1024;
if (nSignedPruneTarget < 0) {
@@ -1121,7 +1119,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
* that the server is there and will be ready later). Warmup mode will
* be disabled when initialisation is finished.
*/
- if (fServer)
+ if (GetBoolArg("-server", false))
{
uiInterface.InitMessage.connect(SetRPCWarmupStatus);
if (!AppInitServers(threadGroup))
diff --git a/src/util.cpp b/src/util.cpp
index c20ede622..332e07762 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -107,7 +107,6 @@ map<string, vector<string> > mapMultiArgs;
bool fDebug = false;
bool fPrintToConsole = false;
bool fPrintToDebugLog = true;
-bool fServer = false;
string strMiscWarning;
bool fLogTimestamps = DEFAULT_LOGTIMESTAMPS;
bool fLogTimeMicros = DEFAULT_LOGTIMEMICROS;
diff --git a/src/util.h b/src/util.h
index bbb9b5db8..e8aa266f2 100644
--- a/src/util.h
+++ b/src/util.h
@@ -46,7 +46,6 @@ extern std::map<std::string, std::vector<std::string> > mapMultiArgs;
extern bool fDebug;
extern bool fPrintToConsole;
extern bool fPrintToDebugLog;
-extern bool fServer;
extern std::string strMiscWarning;
extern bool fLogTimestamps;
extern bool fLogTimeMicros;