Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | void TestGUI(interfaces::Node &node) { | ||||
TestChain100Setup test; | TestChain100Setup test; | ||||
for (int i = 0; i < 5; ++i) { | for (int i = 0; i < 5; ++i) { | ||||
test.CreateAndProcessBlock( | test.CreateAndProcessBlock( | ||||
{}, GetScriptForRawPubKey(test.coinbaseKey.GetPubKey())); | {}, GetScriptForRawPubKey(test.coinbaseKey.GetPubKey())); | ||||
} | } | ||||
node.setContext(&test.m_node); | node.setContext(&test.m_node); | ||||
std::shared_ptr<CWallet> wallet = | std::shared_ptr<CWallet> wallet = | ||||
std::make_shared<CWallet>(node.context()->chain.get(), WalletLocation(), | std::make_shared<CWallet>(node.context()->chain.get(), WalletLocation(), | ||||
WalletDatabase::CreateMock()); | CreateMockWalletDatabase()); | ||||
bool firstRun; | bool firstRun; | ||||
wallet->LoadWallet(firstRun); | wallet->LoadWallet(firstRun); | ||||
{ | { | ||||
auto spk_man = wallet->GetOrCreateLegacyScriptPubKeyMan(); | auto spk_man = wallet->GetOrCreateLegacyScriptPubKeyMan(); | ||||
LOCK2(wallet->cs_wallet, spk_man->cs_KeyStore); | LOCK2(wallet->cs_wallet, spk_man->cs_KeyStore); | ||||
wallet->SetAddressBook( | wallet->SetAddressBook( | ||||
GetDestinationForKey(test.coinbaseKey.GetPubKey(), | GetDestinationForKey(test.coinbaseKey.GetPubKey(), | ||||
▲ Show 20 Lines • Show All 149 Lines • Show Last 20 Lines |