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.
This commit is contained in:
6 files changed
+68
-32
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user