Skip to content

Commit bbeead2

Browse files
committed
Set max_inbound_htlc_value_in_flight to 100% for private channels
.. until LDK defaults to this behavior
1 parent e6f6089 commit bbeead2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,14 @@ impl Node {
10761076
let mut user_config = default_user_config(&self.config);
10771077
user_config.channel_handshake_config.announced_channel = announce_channel;
10781078
user_config.channel_config = (*(channel_config.unwrap_or_default())).clone().into();
1079+
// We set the max inflight to 100% for private channels.
1080+
// FIXME: LDK will default to this behavior soon, too, at which point we should drop this
1081+
// manual override.
1082+
if !announce_channel {
1083+
user_config
1084+
.channel_handshake_config
1085+
.max_inbound_htlc_value_in_flight_percent_of_channel = 100;
1086+
}
10791087

10801088
let push_msat = push_to_counterparty_msat.unwrap_or(0);
10811089
let user_channel_id: u128 = rand::thread_rng().gen::<u128>();

0 commit comments

Comments
 (0)