`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.
std::set<CInputCoin>& setCoinsRet, CAmount& nValueRet, const CoinSelectionParams& coin_selection_params, bool& bnb_used) const
{
    setCoinsRet.clear();
    nValueRet = 0;
    std::vector<OutputGroup> utxo_pool;
    if (coin_selection_params.use_bnb) {
        
        FeeCalculation feeCalc;
        CCoinControl temp;
        temp.m_confirm_target = 1008;
        CFeeRate long_term_feerate = GetMinimumFeeRate(*this, temp, ::mempool, ::feeEstimator, &feeCalc);
        
        CAmount cost_of_change = GetDiscardRate(*this, ::feeEstimator).GetFee(coin_selection_params.change_spend_size) + coin_selection_params.effective_fee.GetFee(coin_selection_params.change_output_size);
        
        for (OutputGroup& group : groups) {
            if (!group.EligibleForSpending(eligibility_filter)) continue;
            group.fee = 0;
            group.long_term_fee = 0;
            group.effective_value = 0;