mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Merge bitcoin/bitcoin#22216: refactor: Make SetupServerArgs callable without NodeContext
493fb47c57Make SetupServerArgs callable without NodeContext (Russell Yanofsky) Pull request description: `bitcoin-gui` code needs to call `SetupServerArgs` but will not have a `NodeContext` object if it is communicating with an external `bitcoin-node` process, so this just passes `ArgsManager` directly. --- This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). The commit was first part of larger PR #10102. ACKs for top commit: MarcoFalke: review ACK493fb47c57Tree-SHA512: 94cda4350113237976e32f1935e3602d1e6ea90c29c4434db2094be70dddf4b63702c3094385258bdf1c3e5b52c7d23bbc1f0282bdd4965557eedd5aef9a0fd4
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