]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix max fee_satoshis constant to be 21 million, not 2.1 million.
authorMatt Corallo <git@bluematt.me>
Fri, 18 Sep 2020 17:05:43 +0000 (13:05 -0400)
committerMatt Corallo <git@bluematt.me>
Mon, 5 Oct 2020 15:32:30 +0000 (11:32 -0400)
Though hopefully we never see a fee of 2.1 million BTC, either...

lightning/src/ln/channel.rs

index 21917bb72967e0f17f1b4cd110a9a9cef558b734..407c9adbce55d8aa094736e545a2f81c5e1b448e 100644 (file)
@@ -3007,7 +3007,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
                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()));
                }