From 6366fc7154e1a5be9723dabe2dd323f23e07407f Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 18 Sep 2020 13:05:43 -0400 Subject: [PATCH] Fix max fee_satoshis constant to be 21 million, not 2.1 million. Though hopefully we never see a fee of 2.1 million BTC, either... --- lightning/src/ln/channel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 21917bb72..407c9adbc 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -3007,7 +3007,7 @@ impl Channel { if !self.pending_inbound_htlcs.is_empty() || !self.pending_outbound_htlcs.is_empty() { return Err(ChannelError::Close("Remote end sent us a closing_signed while there were still pending HTLCs".to_owned())); } - if msg.fee_satoshis > 21000000 * 10000000 { //this is required to stop potential overflow in build_closing_transaction + if msg.fee_satoshis > 21_000_000 * 1_0000_0000 { //this is required to stop potential overflow in build_closing_transaction return Err(ChannelError::Close("Remote tried to send us a closing tx with > 21 million BTC fee".to_owned())); } -- 2.39.5