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)
192192 }
193193}
194194
195+ void InitContext (NodeContext& node)
196+ {
197+ node.args = &gArgs ;
198+ }
195199
196200// ////////////////////////////////////////////////////////////////////////////
197201//
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ namespace node {
2626struct NodeContext ;
2727} // namespace node
2828
29+ /* * Initialize node context variables. */
30+ void InitContext (node::NodeContext& node);
31+
2932/* * Interrupt threads */
3033void Interrupt (node::NodeContext& node);
3134void Shutdown (node::NodeContext& node);
Original file line number Diff line number Diff line change 22// Distributed under the MIT software license, see the accompanying
33// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44
5- #include < common/args .h>
5+ #include < init .h>
66#include < interfaces/chain.h>
77#include < interfaces/echo.h>
88#include < interfaces/init.h>
@@ -23,7 +23,7 @@ class BitcoinGuiInit : public interfaces::Init
2323public:
2424 BitcoinGuiInit (const char * arg0) : m_ipc(interfaces::MakeIpc(EXE_NAME, arg0, *this ))
2525 {
26- m_node. args = & gArgs ;
26+ InitContext ( m_node) ;
2727 m_node.init = this ;
2828 }
2929 std::unique_ptr<interfaces::Node> makeNode () override { return interfaces::MakeNode (m_node); }
Original file line number Diff line number Diff line change 22// Distributed under the MIT software license, see the accompanying
33// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44
5- #include < common/args .h>
5+ #include < init .h>
66#include < interfaces/chain.h>
77#include < interfaces/echo.h>
88#include < interfaces/init.h>
@@ -25,7 +25,7 @@ class BitcoinNodeInit : public interfaces::Init
2525 : m_node(node),
2626 m_ipc (interfaces::MakeIpc(EXE_NAME, arg0, *this ))
2727 {
28- m_node. args = & gArgs ;
28+ InitContext ( m_node) ;
2929 m_node.init = this ;
3030 }
3131 std::unique_ptr<interfaces::Node> makeNode () override { return interfaces::MakeNode (m_node); }
Original file line number Diff line number Diff line change 22// Distributed under the MIT software license, see the accompanying
33// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44
5- #include < common/args .h>
5+ #include < init .h>
66#include < interfaces/chain.h>
77#include < interfaces/echo.h>
88#include < interfaces/init.h>
@@ -20,7 +20,7 @@ class BitcoinQtInit : public interfaces::Init
2020public:
2121 BitcoinQtInit ()
2222 {
23- m_node. args = & gArgs ;
23+ InitContext ( m_node) ;
2424 m_node.init = this ;
2525 }
2626 std::unique_ptr<interfaces::Node> makeNode () override { return interfaces::MakeNode (m_node); }
Original file line number Diff line number Diff line change 22// Distributed under the MIT software license, see the accompanying
33// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44
5- #include < common/args .h>
5+ #include < init .h>
66#include < interfaces/chain.h>
77#include < interfaces/echo.h>
88#include < interfaces/init.h>
@@ -22,7 +22,7 @@ class BitcoindInit : public interfaces::Init
2222public:
2323 BitcoindInit (NodeContext& node) : m_node(node)
2424 {
25- m_node. args = & gArgs ;
25+ InitContext ( m_node) ;
2626 m_node.init = this ;
2727 }
2828 std::unique_ptr<interfaces::Node> makeNode () override { return interfaces::MakeNode (m_node); }
You can’t perform that action at this time.
0 commit comments