diff options
author | MeshCollider <dobsonsa68@gmail.com> | 2018-12-12 18:00:20 +1300 |
---|---|---|
committer | MeshCollider <dobsonsa68@gmail.com> | 2018-12-12 18:00:42 +1300 |
commit | ed2a2cebd36280be0b5e585a8c3c901c15e52f87 (patch) | |
tree | da624fc441d58ed88dc6542962cfd7eb4258fb20 /src/qt | |
parent | 3fff1ab817e7995720c3aa0374807ed70d1a4d24 (diff) | |
parent | bd3b0361d840bff95988a048abf70ade94d80524 (diff) |
Merge #13076: Fix ScanForWalletTransactions to return an enum indicating scan result: success / failure / user_abort
bd3b0361d Add stop_block out arg to ScanForWalletTransactions (Ben Woosley)
3002d6cf3 Return a status enum from ScanForWalletTransactions (Ben Woosley)
bb24d6865 Make CWallet::ScanForWalletTransactions args and return value const (Ben Woosley)
Pull request description:
Return the failed block as an out arg.
Fixes #11450.
/cc #12275
Tree-SHA512: 6a523e5425ebfe24e664a942ae21c797ccc1281c25b1bf8d02ad95c19dae343fd8051985ef11853474de7628fd6bed5f15190fbc087c3466ce6fdecab37d72a9
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/test/wallettests.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index f02fd8aea7..610d83acb6 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -146,7 +146,13 @@ 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, *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); } wallet->SetBroadcastTransactions(true); |