Skip to content

Commit 25a6350

Browse files
authored
add comment as to why test is required
1 parent b6cc763 commit 25a6350

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2102,7 +2102,7 @@ impl Channel {
21022102
if !self.pending_inbound_htlcs.is_empty() || !self.pending_outbound_htlcs.is_empty() {
21032103
return Err(HandleError{err: "Remote end sent us a closing_signed while there were still pending HTLCs", action: None});
21042104
}
2105-
if msg.fee_satoshis > 21000000 * 10000000 { //is this test required? We check for a much lower amount below, thus if that one will fail, this one will always fail?
2105+
if msg.fee_satoshis > 21000000 * 10000000 { //this is required to stop potential overflow in build_closing_transaction
21062106
return Err(HandleError{err: "Remote tried to send us a closing tx with > 21 million BTC fee", action: None});
21072107
}
21082108

0 commit comments

Comments
 (0)