From: Matt Corallo Date: Fri, 18 Sep 2020 17:05:43 +0000 (-0400) Subject: Fix max fee_satoshis constant to be 21 million, not 2.1 million. X-Git-Tag: v0.0.12~17^2~2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=6366fc7154e1a5be9723dabe2dd323f23e07407f;p=rust-lightning 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... --- 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())); }