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
iter++;
            }
            // I
            // a
            MarkInputsDirty(wtx.tx);
        }
    }
    return true;
}
void CWaet::MarkConflicted(const uint256& hashBlock, int conflicting_height, const uint256& hashTx)
{
    LOCK(cs_);
    int conflictconfirms = (m_last_block_processed_height - conflicting_height + 1) * -1;
    // I
    // t
    // f
    // c
    if (conflictconfirms >= 0)
        return;
    // D
    WaetBatch batch(GetDatabase(), false);
    std::set<uint256> todo;
    std::set<uint256> done;
    todo.insert(hashTx);
    while (!todo.empty()) {
        uint256 now = *todo.begin();
        todo.erase(now);
        done.insert(now);
        auto it = mapWaet.find(now);
        assert(it != mapWaet.end());