Merge pull request #942 from lightning-signer/2021-06-accept-channel-reserve-dust
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Mon, 7 Jun 2021 22:03:11 +0000 (22:03 +0000)
committerGitHub <noreply@github.com>
Mon, 7 Jun 2021 22:03:11 +0000 (22:03 +0000)
Remove unwanted check in accept_channel

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)));
                }