Skip to content

Commit a8f686d

Browse files
committed
Add new field to ChannelHandshakeConfigUpdate
Allow per-channel configuration of min_their_channel_reserve_satoshis via ChannelHandshakeConfigUpdate. This enables setting the value to 0 for LSP-client channels while keeping the default for other channels.
1 parent 52603a9 commit a8f686d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lightning/src/util/config.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,10 @@ pub struct ChannelHandshakeConfigUpdate {
990990
/// The Proportion of the channel value to configure as counterparty's channel reserve. See
991991
/// [`ChannelHandshakeConfig::their_channel_reserve_proportional_millionths`].
992992
pub channel_reserve_proportional_millionths: Option<u32>,
993+
994+
/// The minimum absolute channel reserve value in satoshis that will be enforced regardless of
995+
/// the proportional reserve calculation. See [`ChannelHandshakeConfig::min_their_channel_reserve_satoshis`].
996+
pub min_their_channel_reserve_satoshis: Option<u64>,
993997
}
994998

995999
impl ChannelHandshakeConfig {
@@ -1020,5 +1024,9 @@ impl ChannelHandshakeConfig {
10201024
if let Some(channel_reserve) = config.channel_reserve_proportional_millionths {
10211025
self.their_channel_reserve_proportional_millionths = channel_reserve;
10221026
}
1027+
1028+
if let Some(min_reserve) = config.min_their_channel_reserve_satoshis {
1029+
self.min_their_channel_reserve_satoshis = min_reserve;
1030+
}
10231031
}
10241032
}

0 commit comments

Comments
 (0)