mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-21 04:09:09 +02:00
Pass NodeContext, ConnMan, BanMan references more places
So g_connman and g_banman globals can be removed next commit.
This commit is contained in:
@@ -51,11 +51,10 @@ void EditAddressAndSubmit(
|
||||
* In each case, verify the resulting state of the address book and optionally
|
||||
* the warning message presented to the user.
|
||||
*/
|
||||
void TestAddAddressesToSendBook()
|
||||
void TestAddAddressesToSendBook(interfaces::Node& node)
|
||||
{
|
||||
TestChain100Setup test;
|
||||
auto chain = interfaces::MakeChain();
|
||||
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain.get(), WalletLocation(), WalletDatabase::CreateMock());
|
||||
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), WalletLocation(), WalletDatabase::CreateMock());
|
||||
bool firstRun;
|
||||
wallet->LoadWallet(firstRun);
|
||||
|
||||
@@ -101,10 +100,9 @@ void TestAddAddressesToSendBook()
|
||||
|
||||
// Initialize relevant QT models.
|
||||
std::unique_ptr<const PlatformStyle> platformStyle(PlatformStyle::instantiate("other"));
|
||||
auto node = interfaces::MakeNode();
|
||||
OptionsModel optionsModel(*node);
|
||||
OptionsModel optionsModel(node);
|
||||
AddWallet(wallet);
|
||||
WalletModel walletModel(std::move(node->getWallets()[0]), *node, platformStyle.get(), &optionsModel);
|
||||
WalletModel walletModel(interfaces::MakeWallet(wallet), node, platformStyle.get(), &optionsModel);
|
||||
RemoveWallet(wallet);
|
||||
EditAddressDialog editAddressDialog(EditAddressDialog::NewSendingAddress);
|
||||
editAddressDialog.setModel(walletModel.getAddressTableModel());
|
||||
@@ -150,5 +148,5 @@ void AddressBookTests::addressBookTests()
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
TestAddAddressesToSendBook();
|
||||
TestAddAddressesToSendBook(m_node);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user