Some comments from @sipa in #12702.

___

Yes, I think `importmulti` is superior in every way, except:
* Slightly less convenient to use (it requires redundant information, as you have to explicitly state what you want to import, and then give the keys/... to enable that).
* ~Doesn't support P2SH-P2WPKH yet~. Added in #14454

The latter can be fixed by just adding support for that case. The former can be improved by adding 'default' cases (e.g. if you prove a WIF private key, it can permit omitting the address, ...).

const UniValue& requests = mainRequest.params[0];
    
    bool fRescan = true;
    if (!mainRequest.params[1].isNull()) {
        const UniValue& options = mainRequest.params[1];
        if (options.exists("rescan")) {
            fRescan = options["rescan"].get_bool();
        }
    }
    WalletRescanReserver reserver(pwallet);
    if (fRescan && !reserver.reserve()) {
        throw JSONRPCError(RPC_WALLET_ERROR, "Wallet is currently rescanning. Abort existing rescan or wait.");
    }
    int64_t now = 0;
    bool fRunScan = false;
    int64_t nLowestTimestamp = 0;
    UniValue response(UniValue::VARR);
    {
        LOCK2(cs_main, pwallet->cs_wallet);
        EnsureWalletIsUnlocked(pwallet);
        
        now = chainActive.Tip() ? chainActive.Tip()->GetMedianTimePast() : 0;
        for (const UniValue& data : requests.getValues()) {
            GetImportTimestamp(data, now);
        }
        const int64_t minimumTimestamp = 1;
        if (fRescan && chainActive.Tip()) {
            nLowestTimestamp = chainActive.Tip()->GetBlockTime();
        } else {
            fRescan = false;