mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
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.
This commit is contained in:
@@ -192,6 +192,10 @@ static void RemovePidFile(const ArgsManager& args)
|
||||
}
|
||||
}
|
||||
|
||||
void InitContext(NodeContext& node)
|
||||
{
|
||||
node.args = &gArgs;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user