1 // Copyright (c) 2021 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #include <interfaces/init.h>
6 #include <node/context.h>
7 #include <util/system.h>
8 
9 #include <memory>
10 
11 namespace init {
12 namespace {
13 class BitcoindInit : public interfaces::Init
14 {
15 public:
BitcoindInit(NodeContext & node)16     BitcoindInit(NodeContext& node) : m_node(node)
17     {
18         m_node.args = &gArgs;
19         m_node.init = this;
20     }
21     NodeContext& m_node;
22 };
23 } // namespace
24 } // namespace init
25 
26 namespace interfaces {
MakeNodeInit(NodeContext & node,int argc,char * argv[],int & exit_status)27 std::unique_ptr<Init> MakeNodeInit(NodeContext& node, int argc, char* argv[], int& exit_status)
28 {
29     return std::make_unique<init::BitcoindInit>(node);
30 }
31 } // namespace interfaces
32