diff options
Diffstat (limited to 'src/qt/test')
-rw-r--r-- | src/qt/test/wallettests.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index 610d83acb6..ee84da0cdf 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -1,6 +1,7 @@ #include <qt/test/wallettests.h> #include <qt/test/util.h> +#include <init.h> #include <interfaces/chain.h> #include <interfaces/node.h> #include <base58.h> @@ -146,13 +147,10 @@ void TestGUI() auto locked_chain = wallet->chain().lock(); WalletRescanReserver reserver(wallet.get()); reserver.reserve(); - const CBlockIndex* const null_block = nullptr; - const CBlockIndex *stop_block, *failed_block; - QCOMPARE( - wallet->ScanForWalletTransactions(chainActive.Genesis(), nullptr, reserver, failed_block, stop_block, true /* fUpdate */), - CWallet::ScanResult::SUCCESS); - QCOMPARE(stop_block, chainActive.Tip()); - QCOMPARE(failed_block, null_block); + CWallet::ScanResult result = wallet->ScanForWalletTransactions(locked_chain->getBlockHash(0), {} /* stop_block */, reserver, true /* fUpdate */); + QCOMPARE(result.status, CWallet::ScanResult::SUCCESS); + QCOMPARE(result.stop_block, chainActive.Tip()->GetBlockHash()); + QVERIFY(result.failed_block.IsNull()); } wallet->SetBroadcastTransactions(true); |