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, ...).

if (request.fHelp || request.params.size() != 1) {
        throw std::runtime_error(
            "abandontransaction \"txid\"\n"
            "\nMark in-wallet transaction <txid> as abandoned\n"
            "This will mark this transaction and all its in-wallet descendants as abandoned which will allow\n"
            "for their inputs to be respent.  It can be used to replace \"stuck\" or evicted transactions.\n"
            "It only works on transactions which are not included in a block and are not currently in the mempool.\n"
            "It has no effect on transactions which are already abandoned.\n"
            "\nArguments:\n"
            "1. \"txid\"    (string, required) The transaction id\n"
            "\nResult:\n"
            "\nExamples:\n"
            + HelpExampleCli("abandontransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
            + HelpExampleRpc("abandontransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
        );
    }
    
    
    pwallet->BlockUntilSyncedToCurrentChain();
    LOCK2(cs_main, pwallet->cs_wallet);
    uint256 hash(ParseHashV(request.params[0], "txid"));
    if (!pwallet->mapWallet.count(hash)) {
        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid or non-wallet transaction id");
    }
    if (!pwallet->AbandonTransaction(hash)) {
        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Transaction not eligible for abandonment");
    }
    return NullUniValue;
}
static UniValue backupwallet(const JSONRPCRequest& request)