Skip to content

Commit 1618a45

Browse files
amackillopFernando Ledesma
authored andcommitted
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.
1 parent 7c9fbc1 commit 1618a45

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/event.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,13 +1230,11 @@ where
12301230
let user_channel_id: u128 = rng().random();
12311231
let allow_0conf = self.config.trusted_peers_0conf.contains(&counterparty_node_id);
12321232
let mut channel_override_config = None;
1233-
if let Some((lsp_node_id, _)) = self
1234-
.liquidity_source
1235-
.as_ref()
1236-
.and_then(|ls| ls.as_ref().get_lsps2_lsp_details())
1237-
{
1233+
if let Some((lsp_node_id, _)) = self.liquidity_source.as_ref().and_then(|ls| {
1234+
ls.get_lsps2_lsp_details().or(ls.get_lsps4_lsp_details())
1235+
}) {
12381236
if lsp_node_id == counterparty_node_id {
1239-
// When we're an LSPS2 client, allow claiming underpaying HTLCs as the LSP will skim off some fee. We'll
1237+
// When we're an LSPS2/4 client, allow claiming underpaying HTLCs as the LSP will skim off some fee. We'll
12401238
// check that they don't take too much before claiming.
12411239
//
12421240
// We also set maximum allowed inbound HTLC value in flight

0 commit comments

Comments
 (0)