File tree Expand file tree Collapse file tree 6 files changed +15
-8
lines changed Expand file tree Collapse file tree 6 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,10 @@ static void RemovePidFile(const ArgsManager& args)
192
192
}
193
193
}
194
194
195
+ void InitContext (NodeContext& node)
196
+ {
197
+ node.args = &gArgs ;
198
+ }
195
199
196
200
// ////////////////////////////////////////////////////////////////////////////
197
201
//
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ namespace node {
26
26
struct NodeContext ;
27
27
} // namespace node
28
28
29
+ /* * Initialize node context variables. */
30
+ void InitContext (node::NodeContext& node);
31
+
29
32
/* * Interrupt threads */
30
33
void Interrupt (node::NodeContext& node);
31
34
void Shutdown (node::NodeContext& node);
Original file line number Diff line number Diff line change 2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
5
- #include < common/args .h>
5
+ #include < init .h>
6
6
#include < interfaces/chain.h>
7
7
#include < interfaces/echo.h>
8
8
#include < interfaces/init.h>
@@ -23,7 +23,7 @@ class BitcoinGuiInit : public interfaces::Init
23
23
public:
24
24
BitcoinGuiInit (const char * arg0) : m_ipc(interfaces::MakeIpc(EXE_NAME, arg0, *this ))
25
25
{
26
- m_node. args = & gArgs ;
26
+ InitContext ( m_node) ;
27
27
m_node.init = this ;
28
28
}
29
29
std::unique_ptr<interfaces::Node> makeNode () override { return interfaces::MakeNode (m_node); }
Original file line number Diff line number Diff line change 2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
5
- #include < common/args .h>
5
+ #include < init .h>
6
6
#include < interfaces/chain.h>
7
7
#include < interfaces/echo.h>
8
8
#include < interfaces/init.h>
@@ -25,7 +25,7 @@ class BitcoinNodeInit : public interfaces::Init
25
25
: m_node(node),
26
26
m_ipc (interfaces::MakeIpc(EXE_NAME, arg0, *this ))
27
27
{
28
- m_node. args = & gArgs ;
28
+ InitContext ( m_node) ;
29
29
m_node.init = this ;
30
30
}
31
31
std::unique_ptr<interfaces::Node> makeNode () override { return interfaces::MakeNode (m_node); }
Original file line number Diff line number Diff line change 2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
5
- #include < common/args .h>
5
+ #include < init .h>
6
6
#include < interfaces/chain.h>
7
7
#include < interfaces/echo.h>
8
8
#include < interfaces/init.h>
@@ -20,7 +20,7 @@ class BitcoinQtInit : public interfaces::Init
20
20
public:
21
21
BitcoinQtInit ()
22
22
{
23
- m_node. args = & gArgs ;
23
+ InitContext ( m_node) ;
24
24
m_node.init = this ;
25
25
}
26
26
std::unique_ptr<interfaces::Node> makeNode () override { return interfaces::MakeNode (m_node); }
Original file line number Diff line number Diff line change 2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
5
- #include < common/args .h>
5
+ #include < init .h>
6
6
#include < interfaces/chain.h>
7
7
#include < interfaces/echo.h>
8
8
#include < interfaces/init.h>
@@ -22,7 +22,7 @@ class BitcoindInit : public interfaces::Init
22
22
public:
23
23
BitcoindInit (NodeContext& node) : m_node(node)
24
24
{
25
- m_node. args = & gArgs ;
25
+ InitContext ( m_node) ;
26
26
m_node.init = this ;
27
27
}
28
28
std::unique_ptr<interfaces::Node> makeNode () override { return interfaces::MakeNode (m_node); }
You can’t perform that action at this time.
0 commit comments