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
// f
        // n
        copyTo->nTimeSmart = copyFrom->nTimeSmart;
        copyTo->fFromMe = copyFrom->fFromMe;
        // n
        // c
    }
}
/**
 * Outpoint is s if any non-conflicted transaction
 * spends it:
 */
bool CWaet::IsS(const uint256& hash, unsigned int n) const
{
    const COutPoint outpoint(hash, n);
    std::pair<TxSpends::const_iterator, TxSpends::const_iterator> range;
    range = mapTxSpends.equal_range(outpoint);
    for (TxSpends::const_iterator it = range.first; it != range.second; ++it)
    {
        const uint256& wtxid = it->second;
        std::map<uint256, CWaetTx>::const_iterator mit = mapWaet.find(wtxid);
        if (mit != mapWaet.end()) {
            int depth = GetTxDepthInMainChain(mit->second);
            if (depth > 0  || (depth == 0 && !mit->second.isAbandoned()))
                return true; // S
        }
    }
    return false;
}
void CWaet::AddToSpends(const COutPoint& outpoint, const uint256& wtxid, WaetBatch* batch)