`ScanForWalletTransactions()` has the following comment about its return value:

```
 * Returns null if scan was successful. Otherwise, if a complete rescan was not
 * possible (due to pruning or corruption), returns pointer to the most recent
 * block that could not be scanned.
```

This is not strictly true. If `abortrescan` is called, then `ScanForWalletTransactions()` will return `nullptr`, even though the scan wasn't successful to the tip.

This in turn causes a minor bug in `importmulti`, where the call doesn't return the correct error and warning about potentially not finding transactions if `abortrescan` was called.

I think the correct fix is for `ScanForWalletTransactions()` to inform the caller that the rescan was aborted.
+ HelpExampleRpc("rescanblockchain", "100000, 120000")
            );
    }
    WalletRescanReserver reserver(pwallet);
    if (!reserver.reserve()) {
        throw JSONRPCError(RPC_WALLET_ERROR, "Wallet is currently rescanning. Abort existing rescan or wait.");
    }
    CBlockIndex *pindexStart = nullptr;
    CBlockIndex *pindexStop = nullptr;
    CBlockIndex *pChainTip = nullptr;
    {
        auto locked_chain = pwallet->chain().lock();
        pindexStart = chainActive.Genesis();
        pChainTip = chainActive.Tip();
        if (!request.params[0].isNull()) {
            pindexStart = chainActive[request.params[0].get_int()];
            if (!pindexStart) {
                throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid start_height");
            }
        }
        if (!request.params[1].isNull()) {
            pindexStop = chainActive[request.params[1].get_int()];
            if (!pindexStop) {
                throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid stop_height");
            }
            else if (pindexStop->nHeight < pindexStart->nHeight) {
                throw JSONRPCError(RPC_INVALID_PARAMETER, "stop_height must be greater than start_height");
            }
        }
    }