From: Devrandom Date: Mon, 7 Jun 2021 14:22:07 +0000 (+0200) Subject: Remove unwanted check in accept_channel X-Git-Tag: v0.0.98~6^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=b22e5c0c9ba2dddc18e77e6f9af8abe0f9d88629;p=rust-lightning Remove unwanted check in accept_channel This caused an interoperability issue with lnd, because they can propose a reserve lower than their dust limit (but not lower than ours). --- diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 07293a102..f8c8c15be 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -1428,9 +1428,6 @@ impl Channel { if msg.channel_reserve_satoshis > self.channel_value_satoshis { return Err(ChannelError::Close(format!("Bogus channel_reserve_satoshis ({}). Must not be greater than ({})", msg.channel_reserve_satoshis, self.channel_value_satoshis))); } - if msg.dust_limit_satoshis > msg.channel_reserve_satoshis { - return Err(ChannelError::Close(format!("Bogus channel_reserve ({}) and dust_limit ({})", msg.channel_reserve_satoshis, msg.dust_limit_satoshis))); - } if msg.channel_reserve_satoshis < self.holder_dust_limit_satoshis { return Err(ChannelError::Close(format!("Peer never wants payout outputs? channel_reserve_satoshis was ({}). dust_limit is ({})", msg.channel_reserve_satoshis, self.holder_dust_limit_satoshis))); }