aboutsummaryrefslogtreecommitdiff
path: root/src/init/bitcoind.cpp
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2023-07-07 17:32:54 -0400
committerRyan Ofsky <ryan@ofsky.org>2023-12-04 15:39:15 -0400
commit213542b625a6a4885fcbdfe236629a5f381eeb05 (patch)
treefe10697e9196bd5546c372766f74f8fe84182cbe /src/init/bitcoind.cpp
parentfeeb7b816affa790e02e7ba0780c4ef33d2310ff (diff)
refactor: Add InitContext function to initialize NodeContext with global pointers
Having InitContext() avoids the need to add duplicate code to src/init/*.cpp files in the next commit. It also lets these files avoid referencing global variables like gArgs. There is no change in behavior in this commit.
Diffstat (limited to 'src/init/bitcoind.cpp')
-rw-r--r--src/init/bitcoind.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/init/bitcoind.cpp b/src/init/bitcoind.cpp
index 210608370c..b5df764017 100644
--- a/src/init/bitcoind.cpp
+++ b/src/init/bitcoind.cpp
@@ -2,7 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include <common/args.h>
+#include <init.h>
#include <interfaces/chain.h>
#include <interfaces/echo.h>
#include <interfaces/init.h>
@@ -22,7 +22,7 @@ class BitcoindInit : public interfaces::Init
public:
BitcoindInit(NodeContext& node) : m_node(node)
{
- m_node.args = &gArgs;
+ InitContext(m_node);
m_node.init = this;
}
std::unique_ptr<interfaces::Node> makeNode() override { return interfaces::MakeNode(m_node); }