Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | void TestGUI(interfaces::Node &node) { | ||||
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>( | std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>( | ||||
Params(), node.context()->chain.get(), WalletLocation(), | Params(), node.context()->chain.get(), WalletLocation(), | ||||
WalletDatabase::CreateMock()); | WalletDatabase::CreateMock()); | ||||
bool firstRun; | bool firstRun; | ||||
wallet->LoadWallet(firstRun); | wallet->LoadWallet(firstRun); | ||||
{ | { | ||||
auto spk_man = wallet->GetOrCreateLegacyScriptPubKeyMan(); | auto spk_man = wallet->GetOrCreateLegacyScriptPubKeyMan(); | ||||
auto locked_chain = wallet->chain().lock(); | |||||
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(), | ||||
wallet->m_default_address_type), | wallet->m_default_address_type), | ||||
"", "receive"); | "", "receive"); | ||||
spk_man->AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey()); | spk_man->AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey()); | ||||
wallet->SetLastBlockProcessed(105, | wallet->SetLastBlockProcessed(105, | ||||
::ChainActive().Tip()->GetBlockHash()); | ::ChainActive().Tip()->GetBlockHash()); | ||||
▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines |