Skip to content

Commit deec83f

Browse files
committed
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.
1 parent 16ca0bf commit deec83f

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

src/init.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,6 @@ bool AppInitParameterInteraction()
931931
else if (nScriptCheckThreads > MAX_SCRIPTCHECK_THREADS)
932932
nScriptCheckThreads = MAX_SCRIPTCHECK_THREADS;
933933

934-
fServer = GetBoolArg("-server", false);
935-
936934
// block pruning; get the amount of disk space (in MiB) to allot for block & undo files
937935
int64_t nSignedPruneTarget = GetArg("-prune", 0) * 1024 * 1024;
938936
if (nSignedPruneTarget < 0) {
@@ -1121,7 +1119,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
11211119
* that the server is there and will be ready later). Warmup mode will
11221120
* be disabled when initialisation is finished.
11231121
*/
1124-
if (fServer)
1122+
if (GetBoolArg("-server", false))
11251123
{
11261124
uiInterface.InitMessage.connect(SetRPCWarmupStatus);
11271125
if (!AppInitServers(threadGroup))

src/util.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ map<string, vector<string> > mapMultiArgs;
107107
bool fDebug = false;
108108
bool fPrintToConsole = false;
109109
bool fPrintToDebugLog = true;
110-
bool fServer = false;
111110
string strMiscWarning;
112111
bool fLogTimestamps = DEFAULT_LOGTIMESTAMPS;
113112
bool fLogTimeMicros = DEFAULT_LOGTIMEMICROS;

src/util.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ extern std::map<std::string, std::vector<std::string> > mapMultiArgs;
4646
extern bool fDebug;
4747
extern bool fPrintToConsole;
4848
extern bool fPrintToDebugLog;
49-
extern bool fServer;
5049
extern std::string strMiscWarning;
5150
extern bool fLogTimestamps;
5251
extern bool fLogTimeMicros;

0 commit comments

Comments
 (0)