mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
scripted-diff: Rename InitInterfaces to NodeContext
-BEGIN VERIFY SCRIPT-
s() { git grep -l "$1" src | xargs sed -i "s/$1/$2/g"; }
s 'struct InitInterfaces' 'struct NodeContext'
s 'InitInterfaces interfaces' 'NodeContext node'
s 'InitInterfaces& interfaces' 'NodeContext\& node'
s 'InitInterfaces m_interfaces' 'NodeContext m_context'
s 'InitInterfaces\* g_rpc_interfaces' 'NodeContext* g_rpc_node'
s 'g_rpc_interfaces = &interfaces' 'g_rpc_node = \&node'
s 'g_rpc_interfaces' 'g_rpc_node'
s 'm_interfaces' 'm_context'
s 'interfaces\.chain' 'node.chain'
s '\(AppInitMain\|Shutdown\|Construct\)(interfaces)' '\1(node)'
s 'init interfaces' 'chain clients'
-END VERIFY SCRIPT-
This commit is contained in:
@@ -25,8 +25,8 @@ public:
|
||||
//! Wallets parameter interaction
|
||||
bool ParameterInteraction() const override;
|
||||
|
||||
//! Add wallets that should be opened to list of init interfaces.
|
||||
void Construct(InitInterfaces& interfaces) const override;
|
||||
//! Add wallets that should be opened to list of chain clients.
|
||||
void Construct(NodeContext& node) const override;
|
||||
};
|
||||
|
||||
const WalletInitInterface& g_wallet_init_interface = WalletInit();
|
||||
@@ -125,12 +125,12 @@ bool WalletInit::ParameterInteraction() const
|
||||
return true;
|
||||
}
|
||||
|
||||
void WalletInit::Construct(InitInterfaces& interfaces) const
|
||||
void WalletInit::Construct(NodeContext& node) const
|
||||
{
|
||||
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
|
||||
LogPrintf("Wallet disabled!\n");
|
||||
return;
|
||||
}
|
||||
gArgs.SoftSetArg("-wallet", "");
|
||||
interfaces.chain_clients.emplace_back(interfaces::MakeWalletClient(*interfaces.chain, gArgs.GetArgs("-wallet")));
|
||||
node.chain_clients.emplace_back(interfaces::MakeWalletClient(*node.chain, gArgs.GetArgs("-wallet")));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user