Skip to content

Commit b6cc763

Browse files
committed
add comment over potential not required test
1 parent 5f34470 commit b6cc763

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ln/channel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,7 @@ impl Channel {
20122012
if self.channel_outbound && msg.scriptpubkey.len() > 34 {
20132013
return Err(HandleError{err: "Got shutdown_scriptpubkey of absurd length from remote peer", action: None});
20142014
}
2015-
2015+
20162016
//Check shutdown_scriptpubkey form as BOLT says we must
20172017
if !(msg.scriptpubkey.is_p2pkh())&&!(msg.scriptpubkey.is_p2sh())&&!(msg.scriptpubkey.is_v0_p2wpkh())&&!(msg.scriptpubkey.is_v0_p2wsh()){
20182018
return Err(HandleError{err: "Got an invalid scriptpubkey from remote peer", action: Some(msgs::ErrorAction::DisconnectPeer{ msg: None })});
@@ -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 {
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?
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)