Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | wallet->LoadWallet(firstRun); | ||||
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()); | ||||
} | } | ||||
{ | { | ||||
WalletRescanReserver reserver(*wallet); | WalletRescanReserver reserver(*wallet); | ||||
reserver.reserve(); | reserver.reserve(); | ||||
CWallet::ScanResult result = wallet->ScanForWalletTransactions( | CWallet::ScanResult result = wallet->ScanForWalletTransactions( | ||||
Params().GetConsensus().hashGenesisBlock, {} /* max_height */, | Params().GetConsensus().hashGenesisBlock, 0 /* block height */, | ||||
reserver, true /* fUpdate */); | {} /* max height */, reserver, true /* fUpdate */); | ||||
QCOMPARE(result.status, CWallet::ScanResult::SUCCESS); | QCOMPARE(result.status, CWallet::ScanResult::SUCCESS); | ||||
QCOMPARE(result.last_scanned_block, | QCOMPARE(result.last_scanned_block, | ||||
::ChainActive().Tip()->GetBlockHash()); | ::ChainActive().Tip()->GetBlockHash()); | ||||
QVERIFY(result.last_failed_block.IsNull()); | 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. | ||||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |