Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | |||||
// src/qt/test/test_bitcoin-qt -platform cocoa # macOS | // src/qt/test/test_bitcoin-qt -platform cocoa # macOS | ||||
void TestGUI(interfaces::Node &node) { | void TestGUI(interfaces::Node &node) { | ||||
// Set up wallet and chain with 105 blocks (5 mature blocks for spending). | // Set up wallet and chain with 105 blocks (5 mature blocks for spending). | ||||
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.context()->connman = std::move(test.m_node.connman); | |||||
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); | ||||
{ | { | ||||
LOCK(wallet->cs_wallet); | LOCK(wallet->cs_wallet); | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |