Skip to content

Commit fb859bc

Browse files
Merge pull request #4 from moneydevkit/austin/set-channel-override-lsps4
Apply channel overrides for LSPS4 clients
2 parents b70720f + 0cba8fa commit fb859bc

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
@@ -1170,13 +1170,11 @@ where
11701170
let user_channel_id: u128 = rand::thread_rng().gen::<u128>();
11711171
let allow_0conf = self.config.trusted_peers_0conf.contains(&counterparty_node_id);
11721172
let mut channel_override_config = None;
1173-
if let Some((lsp_node_id, _)) = self
1174-
.liquidity_source
1175-
.as_ref()
1176-
.and_then(|ls| ls.as_ref().get_lsps2_lsp_details())
1177-
{
1173+
if let Some((lsp_node_id, _)) = self.liquidity_source.as_ref().and_then(|ls| {
1174+
ls.get_lsps2_lsp_details().or(ls.get_lsps4_lsp_details())
1175+
}) {
11781176
if lsp_node_id == counterparty_node_id {
1179-
// When we're an LSPS2 client, allow claiming underpaying HTLCs as the LSP will skim off some fee. We'll
1177+
// When we're an LSPS2/4 client, allow claiming underpaying HTLCs as the LSP will skim off some fee. We'll
11801178
// check that they don't take too much before claiming.
11811179
//
11821180
// We also set maximum allowed inbound HTLC value in flight

0 commit comments

Comments
 (0)