Skip to content

Commit 6366fc7

Browse files
committed
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...
1 parent 937d1d8 commit 6366fc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3007,7 +3007,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
30073007
if !self.pending_inbound_htlcs.is_empty() || !self.pending_outbound_htlcs.is_empty() {
30083008
return Err(ChannelError::Close("Remote end sent us a closing_signed while there were still pending HTLCs".to_owned()));
30093009
}
3010-
if msg.fee_satoshis > 21000000 * 10000000 { //this is required to stop potential overflow in build_closing_transaction
3010+
if msg.fee_satoshis > 21_000_000 * 1_0000_0000 { //this is required to stop potential overflow in build_closing_transaction
30113011
return Err(ChannelError::Close("Remote tried to send us a closing tx with > 21 million BTC fee".to_owned()));
30123012
}
30133013

0 commit comments

Comments
 (0)