Make sure WalletRescanReserver has successfully reserved the rescan

This commit is contained in:
Jonas Schnelli
2017-12-12 13:13:58 -10:00
parent dbf8556b4d
commit bc356b4268
6 changed files with 44 additions and 21 deletions

View File

@@ -3441,7 +3441,7 @@ UniValue rescanblockchain(const JSONRPCRequest& request)
}
}
CBlockIndex *stopBlock = pwallet->ScanForWalletTransactions(pindexStart, pindexStop, true);
CBlockIndex *stopBlock = pwallet->ScanForWalletTransactions(pindexStart, pindexStop, reserver, true);
if (!stopBlock) {
if (pwallet->IsAbortingRescan()) {
throw JSONRPCError(RPC_MISC_ERROR, "Rescan aborted.");