From 87c3182d06bf0df2e85d16a1128c841d283712e6 Mon Sep 17 00:00:00 2001 From: Leo Nash Date: Tue, 6 Oct 2026 15:53:55 +0000 Subject: [PATCH] Count unknown channel types in anchor reserve Conservatively include channels whose type is not yet known when calculating the anchor reserve. Otherwise, opening or accepting new channels, or splicing funds into existing channels, can leave too little reserved for channels still being negotiated. Do not count channels with unknown channel types when assessing whether 0FC support is required from the chain source. This part is all user-controlled, and we do not want to require the chain source to support 0FC if startup happens with an in-flight channel open, and no other 0FC chain source support predicates are true. Reported by Project Loupe --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index fbb65b0005..ecb4d07085 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2573,7 +2573,7 @@ pub(crate) fn total_anchor_channels_reserve_sats( .contains(&c.counterparty.node_id) && c.channel_shutdown_state .map_or(true, |s| s != ChannelShutdownState::ShutdownComplete) - && c.channel_type.as_ref().map_or(false, requires_anchor_channel_type) + && c.channel_type.as_ref().map_or(true, requires_anchor_channel_type) }) .count() as u64 * config.anchor_channels_config.per_channel_reserve_sats