Skip to content

Commit 9123d6d

Browse files
committed
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.
1 parent 7b4fb9d commit 9123d6d

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lightning/src/ln/channel.rs

-3
Original file line numberDiff line numberDiff line change
@@ -5538,9 +5538,6 @@ impl<SP: Deref> Channel<SP> where
55385538
}
55395539

55405540
pub fn channel_update(&mut self, msg: &msgs::ChannelUpdate) -> Result<(), ChannelError> {
5541-
if msg.contents.htlc_minimum_msat >= self.context.channel_value_satoshis * 1000 {
5542-
return Err(ChannelError::Close("Minimum htlc value is greater than channel value".to_string()));
5543-
}
55445541
self.context.counterparty_forwarding_info = Some(CounterpartyForwardingInfo {
55455542
fee_base_msat: msg.contents.fee_base_msat,
55465543
fee_proportional_millionths: msg.contents.fee_proportional_millionths,

0 commit comments

Comments
 (0)