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
}
            
            
            if (coin_control.m_include_unsafe_inputs) {
                if (auto r7{AttemptSelection(wallet, value_to_select,
                    CoinEligibilityFilter(0 , 0 , max_ancestors-1, max_descendants-1, true ),
                    vCoins, coin_selection_params)}) {
                    return r7;
                }
            }
            
            
            
            if (!fRejectLongChains) {
                if (auto r8{AttemptSelection(wallet, value_to_select,
                                      CoinEligibilityFilter(0, 1, std::numeric_limits<uint64_t>::max(), std::numeric_limits<uint64_t>::max(), true ),
                                      vCoins, coin_selection_params)}) {
                    return r8;
                }
            }
        }
        
        return std::optional<SelectionResult>();
    }();
    if (!res) return std::nullopt;
    
    res->AddInput(preset_inputs);
    return res;
}
static bool IsCurrentForAntiFeeSniping(interfaces::Chain& chain, const uint256& block_hash)