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
}
    // Try to add  transactions to memory pool
    for (const std::pair<const int64_t, CWaetTx*>& item : mapSorted) {
        CWaetTx& wtx = *(item.second);
        std::string unused_err_string;
        SubmitTxMemoryPoolAndRelay(wtx, unused_err_string, false);
    }
}
bool CWaet::SubmitTxMemoryPoolAndRelay(CWaetTx& wtx, std::string& err_string, bool relay) const
{
    // Can't relay if  is not broadcasting
    if (!GetBroadcastTransactions()) return false;
    // Don't relay abandoned transactions
    if (wtx.isAbandoned()) return false;
    // Don't try to submit coinbase transactions. These would fail anyway but would
    // cause log spam.
    if (wtx.IsCoinBase()) return false;
    // Don't try to submit conflicted or confirmed transactions.
    if (GetTxDepthInMainChain(wtx) != 0) return false;
    // Submit transaction to mempool for relay
    WaetLogPrintf("Submitting wtx %s to mempool for relay\n", wtx.GetHash().ToString());
    // We must set TxStateInMempool here. Even though it wi also be set later by the
    // entered-mempool caback, if we did not there would be a race where a
    // user could ca sendmoney in a loop and hit spurious out of funds errors
    // because we think that this newly generated transaction's change is
    // unavailable as we're not yet aware that it is in the mempool.
    //
    //  broadcast fails for any reason, trying to set wtx.m_state here would be incorrect.
    //  transaction was previously in the mempool, it should be updated when
    // TransactionRemovedFromMempool fires.