From 0cba8fa24855c059df3e4857661095aa41c4aa37 Mon Sep 17 00:00:00 2001 From: amackillop Date: Fri, 9 Jan 2026 12:12:55 -0800 Subject: [PATCH] Apply channel overrides for LSPS4 clients Extended channel override configuration logic to apply to LSPS4 clients in addition to LSPS2 clients. This ensures LSPS4 clients receive the same channel configuration overrides, including maximum inbound HTLC value in flight settings and underpaying HTLC claim allowances. --- src/event.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/event.rs b/src/event.rs index ed9f21adf..70e02207e 100644 --- a/src/event.rs +++ b/src/event.rs @@ -1170,13 +1170,11 @@ where let user_channel_id: u128 = rand::thread_rng().gen::(); let allow_0conf = self.config.trusted_peers_0conf.contains(&counterparty_node_id); let mut channel_override_config = None; - if let Some((lsp_node_id, _)) = self - .liquidity_source - .as_ref() - .and_then(|ls| ls.as_ref().get_lsps2_lsp_details()) - { + if let Some((lsp_node_id, _)) = self.liquidity_source.as_ref().and_then(|ls| { + ls.get_lsps2_lsp_details().or(ls.get_lsps4_lsp_details()) + }) { if lsp_node_id == counterparty_node_id { - // When we're an LSPS2 client, allow claiming underpaying HTLCs as the LSP will skim off some fee. We'll + // When we're an LSPS2/4 client, allow claiming underpaying HTLCs as the LSP will skim off some fee. We'll // check that they don't take too much before claiming. // // We also set maximum allowed inbound HTLC value in flight