aboutsummaryrefslogtreecommitdiff
path: root/src/test/util/setup_common.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-12-05 15:57:12 -0500
committerRussell Yanofsky <russ@yanofsky.org>2021-06-10 09:58:45 -0500
commit493fb47c577b7564138c883a8f22cbac3619ce44 (patch)
tree621d419274df1dc2d1f7ac4b925003de33e69cd7 /src/test/util/setup_common.cpp
parent1704bbf2263f16c720604cfab4ccb775315df690 (diff)
Make SetupServerArgs callable without NodeContext
bitcoin-gui code needs to call SetupServerArgs but will not have a NodeContext object if it is communicating with an external bitcoin-node process.
Diffstat (limited to 'src/test/util/setup_common.cpp')
-rw-r--r--src/test/util/setup_common.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index 863c3ab565..9b8a86d5bb 100644
--- a/src/test/util/setup_common.cpp
+++ b/src/test/util/setup_common.cpp
@@ -76,6 +76,7 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName, const std::ve
: m_path_root{fs::temp_directory_path() / "test_common_" PACKAGE_NAME / g_insecure_rand_ctx_temp_path.rand256().ToString()},
m_args{}
{
+ m_node.args = &gArgs;
const std::vector<const char*> arguments = Cat(
{
"dummy",
@@ -94,7 +95,7 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName, const std::ve
gArgs.ForceSetArg("-datadir", m_path_root.string());
gArgs.ClearPathCache();
{
- SetupServerArgs(m_node);
+ SetupServerArgs(*m_node.args);
std::string error;
const bool success{m_node.args->ParseParameters(arguments.size(), arguments.data(), error)};
assert(success);