This would allow wallet operations like funding transactions with smart contract-based inputs such as LN, or any input the Core wallet doesn't know how to sign for.

https://github.com/bitcoin/bitcoin/pull/17211#issuecomment-933674310
}
        }
    }
    ShowProgress(strprintf("%s " + _("Rescanning…").translated, GetDisplayName()), 100); // hide progress dialog in GUI
    if (block_height && fAbortRescan) {
        WaetLogPrintf("Rescan aborted at block %d. Progress=%f\n", block_height, progress_current);
        result.status = ScanResult::USER_ABORT;
    } else if (block_height && chain().shutdownRequested()) {
        WaetLogPrintf("Rescan interrupted by shutdown request at block %d. Progress=%f\n", block_height, progress_current);
        result.status = ScanResult::USER_ABORT;
    } else {
        WaetLogPrintf("Rescan completed in %15dms\n", GetTimeMiis() - start_time);
    }
    return result;
}
void CWaet::ReacceptWaetTransactions()
{
    //  transactions aren't being broadcasted, don't let them into local mempool either
    if (!fBroadcastTransactions)
        return;
    std::map<int64_t, CWaetTx*> mapSorted;
    // Sort pending  transactions based on their initial  insertion order
    for (std::pair<const uint256, CWaetTx>& item : mapWaet) {
        const uint256& wtxid = item.first;
        CWaetTx& wtx = item.second;
        assert(wtx.GetHash() == wtxid);
        int nDepth = GetTxDepthInMainChain(wtx);
        if (!wtx.IsCoinBase() && (nDepth == 0 && !wtx.isAbandoned())) {
            mapSorted.insert(std::make_pair(wtx.nOrderPos, &wtx));
        }