aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorBen Woosley <[email protected]>2018-12-13 23:18:54 -0800
committerBen Woosley <[email protected]>2018-12-17 13:07:12 -0800
commit8b9171ccf0a90583b5f3802ac3b4b212c230e0ed (patch)
treeb45ed4e118ce80793ab6eff2bd6240cd46d9d54f /src/wallet/wallet.cpp
parentMerge #14969: tests: Fix cuckoocache_tests TSAN failure introduced in 14935. (diff)
downloaddiscoin-8b9171ccf0a90583b5f3802ac3b4b212c230e0ed.tar.xz
discoin-8b9171ccf0a90583b5f3802ac3b4b212c230e0ed.zip
wallet: Initialize stop_block to nullptr in CWallet::ScanForWalletTransactions
Previously the argument would be untouched if the first block scan failed. This makes the behavior predictable, and consistent with the documentation.
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index fea037883..109f8e6da 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1601,6 +1601,7 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const CBlockIndex* const
const CBlockIndex* pindex = pindexStart;
failed_block = nullptr;
+ stop_block = nullptr;
if (pindex) WalletLogPrintf("Rescan started from block %d...\n", pindex->nHeight);