Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | wallet->LoadWallet(firstRun); | ||||
"", "receive"); | "", "receive"); | ||||
wallet->AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey()); | wallet->AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey()); | ||||
} | } | ||||
{ | { | ||||
auto locked_chain = wallet->chain().lock(); | auto locked_chain = wallet->chain().lock(); | ||||
WalletRescanReserver reserver(wallet.get()); | WalletRescanReserver reserver(wallet.get()); | ||||
reserver.reserve(); | reserver.reserve(); | ||||
const CBlockIndex *const null_block = nullptr; | const CBlockIndex *const null_block = nullptr; | ||||
const CBlockIndex *stop_block; | const CBlockIndex *stop_block, *failed_block; | ||||
QCOMPARE(wallet->ScanForWalletTransactions( | QCOMPARE(wallet->ScanForWalletTransactions( | ||||
::ChainActive().Genesis(), nullptr, reserver, stop_block, | ::ChainActive().Genesis(), nullptr, reserver, failed_block, | ||||
true /* fUpdate */), | stop_block, true /* fUpdate */), | ||||
CWallet::ScanResult::SUCCESS); | CWallet::ScanResult::SUCCESS); | ||||
QCOMPARE(stop_block, null_block); | QCOMPARE(stop_block, ::ChainActive().Tip()); | ||||
QCOMPARE(failed_block, null_block); | |||||
} | } | ||||
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 |