mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Start using init makeNode, makeChain, etc methods
Use interfaces::Init::make* methods instead of interfaces::Make* functions, so interfaces can be constructed differently in different executables without having to change any code. (So for example bitcoin-gui can make an interfaces::Node pointer that communicates with a bitcoin-node subprocess, while bitcoin-qt can make an interfaces::Node pointer that starts node code in the same process.)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <index/txindex.h>
|
||||
#include <init/common.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <interfaces/init.h>
|
||||
#include <interfaces/node.h>
|
||||
#include <mapport.h>
|
||||
#include <miner.h>
|
||||
@@ -1056,7 +1057,7 @@ bool AppInitLockDataDirectory()
|
||||
|
||||
bool AppInitInterfaces(NodeContext& node)
|
||||
{
|
||||
node.chain = interfaces::MakeChain(node);
|
||||
node.chain = node.init->makeChain();
|
||||
// Create client interfaces for wallets that are supposed to be loaded
|
||||
// according to -wallet and -disablewallet options. This only constructs
|
||||
// the interfaces, it doesn't load wallet data. Wallets actually get loaded
|
||||
|
||||
Reference in New Issue
Block a user