v30.3-roots.1 · Commit 2: [PATCH 02/68] feat(runtime): preserve Roots operator controls on Core 30.3
src/init/common.cpp
Before: src/init/common.cpp · After: src/init/common.cpp
File metadata
index 53f4215c3b655fdf88a28cd36481c0b4b7869044..362e52944f83ebf09f5657bc55b945457f087d19 100644
Download original patch · Release notes
Diff rows 1–23 of 23. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
src/init/common.cpp
CHANGED
|
@@ -40,7 +40,7 @@ void AddLoggingArgs(ArgsManager& argsman)
|
|
|
40
40
|
argsman.AddArg("-loglevelalways", strprintf("Always prepend a category and level (default: %u)", DEFAULT_LOGLEVELALWAYS), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
|
|
41
41
|
argsman.AddArg("-logratelimit", strprintf("Apply rate limiting to unconditional logging to mitigate disk-filling attacks (default: %u)", BCLog::DEFAULT_LOGRATELIMIT), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
|
|
42
42
|
argsman.AddArg("-printtoconsole", "Send trace/debug info to console (default: 1 when no -daemon. To disable logging to file, set -nodebuglogfile)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
|
|
43
|
-
argsman.AddArg("-shrinkdebugfile", "Shrink debug.log file on client startup (default: 1 when no -debug)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
|
|
43
|
+
argsman.AddArg("-shrinkdebugfile", "Shrink debug log file on client startup (default: 1 when no -debug)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
void SetLoggingOptions(const ArgsManager& args)
|
|
@@ -136,6 +136,15 @@ bool StartLogging(const ArgsManager& args)
|
|
|
136
136
|
LogInfo("Config file: %s (not found, skipping)", fs::PathToString(config_file_path));
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
fs::path rwconfig_file_path = args.GetRWConfigFilePath();
|
|
140
|
+
if (fs::exists(rwconfig_file_path)) {
|
|
141
|
+
LogPrintf("R/W Config file: %s\n", fs::PathToString(rwconfig_file_path));
|
|
142
|
+
} else if (gArgs.IsArgSet("-confrw")) {
|
|
143
|
+
InitWarning(strprintf(_("The specified R/W config file %s does not exist"), fs::PathToString(rwconfig_file_path)));
|
|
144
|
+
} else {
|
|
145
|
+
LogPrintf("R/W Config file: %s (not found, skipping)\n", fs::PathToString(rwconfig_file_path));
|
|
146
|
+
}
|
|
147
|
+
|
|
139
148
|
// Log the config arguments to debug.log
|
|
140
149
|
args.LogArgs();
|
|
141
150
|
|