]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Remove unwanted check in accept_channel
authorDevrandom <c1.devrandom@niftybox.net>
Mon, 7 Jun 2021 14:22:07 +0000 (16:22 +0200)
committerDevrandom <c1.devrandom@niftybox.net>
Mon, 7 Jun 2021 14:22:07 +0000 (16:22 +0200)
This caused an interoperability issue with lnd, because they can propose a reserve lower than their dust limit (but not lower than ours).

lightning/src/ln/channel.rs

index 07293a102ea2ea7df99b9a1514c875b4cd98976f..f8c8c15be95ad660f2803125092a6bcac288f8ee 100644 (file)
@@ -1428,9 +1428,6 @@ impl<Signer: Sign> Channel<Signer> {
                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)));
                }