mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user