aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2023-02-27 14:21:13 -0500
committerRyan Ofsky <ryan@ofsky.org>2023-02-27 14:21:13 -0500
commit9a9d5da11fa6033f82dcf8e2298aee29587f5396 (patch)
treecbc98608c2d6791b8d8b7cf38e9c3ce81a6b2422 /src/bitcoin-cli.cpp
parentb20b34f5b33230fe253c81008496bd9b13fd6ecf (diff)
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.
Diffstat (limited to 'src/bitcoin-cli.cpp')
-rw-r--r--src/bitcoin-cli.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 3cb25e5c01..77613f389c 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -161,7 +161,7 @@ static int AppInitRPC(int argc, char* argv[])
}
return EXIT_SUCCESS;
}
- if (!CheckDataDirOption()) {
+ if (!CheckDataDirOption(gArgs)) {
tfm::format(std::cerr, "Error: Specified data directory \"%s\" does not exist.\n", gArgs.GetArg("-datadir", ""));
return EXIT_FAILURE;
}