For testing purposes, I want to reduce the number of confirmations required until a LDK-based Lightning node deems a channel ready for operation.
How can I accomplish this?
In LDK you can configure this for inbound channels via
ChannelHandshakeConfig::minimum_depth and the opening counterparty can limit what maximum value it is willing to accept via
Note that you may also want to enable zero confirmation channels. For outbound channels you can simply enable this via setting
ChannelHandshakeLimits::trust_own_fundings_0conf. As inbound zero confirmation channels are a risk for the accepting party, LDK requires you to manually check and accept each such channel. You can enable this by setting
UserConfig::manually_accept_inbound_channels, upon which you'll start receiving an
OpenChannelRequest event for each inbound channel. For each request you want to accept you then need to call
ChannelManager::accept_inbound_channel_from_trusted_peer_0conf, or can force-close the channel otherwise.