From: Matt Corallo Date: Thu, 28 Sep 2023 00:46:31 +0000 (+0000) Subject: Don't FC when a `channel_update` has a bogus `htlc_minimum_msat` X-Git-Tag: v0.0.117-rc1~16^2~1 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=9123d6d41bb9f2f3094c38344c23278df84c7ee2;p=rust-lightning Don't FC when a `channel_update` has a bogus `htlc_minimum_msat` If a peer sends us a `channel_update` for our own channel with an `htlc_minimum_msat` which is more than the channel's amount, that's dumb, but there's no reason to force-close the channel. We don't even use the field. Here we simply drop the unnecessary check. --- diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index d14a86853..55e56be2a 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -5538,9 +5538,6 @@ impl Channel where } pub fn channel_update(&mut self, msg: &msgs::ChannelUpdate) -> Result<(), ChannelError> { - if msg.contents.htlc_minimum_msat >= self.context.channel_value_satoshis * 1000 { - return Err(ChannelError::Close("Minimum htlc value is greater than channel value".to_string())); - } self.context.counterparty_forwarding_info = Some(CounterpartyForwardingInfo { fee_base_msat: msg.contents.fee_base_msat, fee_proportional_millionths: msg.contents.fee_proportional_millionths,