mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
refactor: Stop using gArgs global in system.cpp
Most of the code in util/system.cpp that was hardcoded to use the global ArgsManager instance `gArgs` has been changed to work with explicit ArgsManager instances (for example in https://github.com/bitcoin/bitcoin/pull/20092). But a few hardcoded references to `gArgs` remain. This commit removes the last ones so these functions aren't reading or writing global state.
This commit is contained in:
@@ -150,7 +150,7 @@ static bool AppInit(NodeContext& node, int argc, char* argv[])
|
||||
std::any context{&node};
|
||||
try
|
||||
{
|
||||
if (!CheckDataDirOption()) {
|
||||
if (!CheckDataDirOption(args)) {
|
||||
return InitError(Untranslated(strprintf("Specified data directory \"%s\" does not exist.\n", args.GetArg("-datadir", ""))));
|
||||
}
|
||||
if (!args.ReadConfigFiles(error, true)) {
|
||||
|
||||
Reference in New Issue
Block a user