Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | void TestGUI() { | ||||
{ | { | ||||
auto locked_chain = wallet->chain().lock(); | auto locked_chain = wallet->chain().lock(); | ||||
WalletRescanReserver reserver(wallet.get()); | WalletRescanReserver reserver(wallet.get()); | ||||
reserver.reserve(); | reserver.reserve(); | ||||
CWallet::ScanResult result = wallet->ScanForWalletTransactions( | CWallet::ScanResult result = wallet->ScanForWalletTransactions( | ||||
locked_chain->getBlockHash(0), BlockHash(), reserver, | locked_chain->getBlockHash(0), BlockHash(), reserver, | ||||
true /* fUpdate */); | true /* fUpdate */); | ||||
QCOMPARE(result.status, CWallet::ScanResult::SUCCESS); | QCOMPARE(result.status, CWallet::ScanResult::SUCCESS); | ||||
QCOMPARE(result.stop_block, ::ChainActive().Tip()->GetBlockHash()); | QCOMPARE(result.last_scanned_block, | ||||
QVERIFY(result.failed_block.IsNull()); | ::ChainActive().Tip()->GetBlockHash()); | ||||
QVERIFY(result.last_failed_block.IsNull()); | |||||
} | } | ||||
wallet->SetBroadcastTransactions(true); | wallet->SetBroadcastTransactions(true); | ||||
// Create widgets for sending coins and listing transactions. | // Create widgets for sending coins and listing transactions. | ||||
std::unique_ptr<const PlatformStyle> platformStyle( | std::unique_ptr<const PlatformStyle> platformStyle( | ||||
PlatformStyle::instantiate("other")); | PlatformStyle::instantiate("other")); | ||||
auto node = interfaces::MakeNode(); | auto node = interfaces::MakeNode(); | ||||
OptionsModel optionsModel(*node); | OptionsModel optionsModel(*node); | ||||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |