diff options
| author | Ben Woosley <[email protected]> | 2018-04-29 15:45:44 +0000 |
|---|---|---|
| committer | Ben Woosley <[email protected]> | 2018-11-13 00:04:13 -0500 |
| commit | 3002d6cf31821622e9f21d51e536cafc5cfb10ae (patch) | |
| tree | a0831d207b5ca61d08285ac71212929817e5d8d4 /src/qt/test/wallettests.cpp | |
| parent | Make CWallet::ScanForWalletTransactions args and return value const (diff) | |
| download | discoin-3002d6cf31821622e9f21d51e536cafc5cfb10ae.tar.xz discoin-3002d6cf31821622e9f21d51e536cafc5cfb10ae.zip | |
Return a status enum from ScanForWalletTransactions
Return the failed block as an out var.
This clarifies the outcome as the prior return value could
be null due to user abort or failure.
Diffstat (limited to 'src/qt/test/wallettests.cpp')
| -rw-r--r-- | src/qt/test/wallettests.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index f02fd8aea..5646070a3 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -146,7 +146,12 @@ void TestGUI() auto locked_chain = wallet->chain().lock(); WalletRescanReserver reserver(wallet.get()); reserver.reserve(); - wallet->ScanForWalletTransactions(chainActive.Genesis(), nullptr, reserver, true); + const CBlockIndex* const null_block = nullptr; + const CBlockIndex* stop_block; + QCOMPARE( + wallet->ScanForWalletTransactions(chainActive.Genesis(), nullptr, reserver, stop_block, true /* fUpdate */), + CWallet::ScanResult::SUCCESS); + QCOMPARE(stop_block, null_block); } wallet->SetBroadcastTransactions(true); |