mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-30 18:35:54 +02: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:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <init.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <interfaces/init.h>
|
||||
#include <interfaces/wallet.h>
|
||||
#include <net.h>
|
||||
#include <node/context.h>
|
||||
@@ -129,7 +130,7 @@ void WalletInit::Construct(NodeContext& node) const
|
||||
LogPrintf("Wallet disabled!\n");
|
||||
return;
|
||||
}
|
||||
auto wallet_client = interfaces::MakeWalletClient(*node.chain, args);
|
||||
auto wallet_client = node.init->makeWalletClient(*node.chain);
|
||||
node.wallet_client = wallet_client.get();
|
||||
node.chain_clients.emplace_back(std::move(wallet_client));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user