Skip to content

Commit a286007

Browse files
committed
Removed method that was no longer of much use
1 parent c6c34af commit a286007

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lightning/src/ln/channel.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4018,12 +4018,8 @@ fn is_unsupported_shutdown_script(their_features: &InitFeatures, scriptpubkey: &
40184018
// which for a a BIP-141-compliant witness program is at max 42 bytes in length.
40194019
// So don't let the remote peer feed us some super fee-heavy script.
40204020
let is_script_too_long = is_outbound && scriptpubkey.len() > 42;
4021-
return is_script_too_long || (is_unsupported_witness_shutdown_script(their_features, scriptpubkey) && !scriptpubkey.is_p2pkh() && !scriptpubkey.is_p2sh() && !scriptpubkey.is_v0_p2wpkh() && !scriptpubkey.is_v0_p2wsh())
4022-
}
4023-
4024-
fn is_unsupported_witness_shutdown_script(their_features: &InitFeatures, scriptpubkey: &Script) -> bool {
4025-
return !their_features.supports_shutdown_anysegwit()
4026-
&& scriptpubkey.is_witness_program()
4021+
let not_valid_witness = !their_features.supports_shutdown_anysegwit() && scriptpubkey.is_witness_program();
4022+
return is_script_too_long || (not_valid_witness && !scriptpubkey.is_p2pkh() && !scriptpubkey.is_p2sh() && !scriptpubkey.is_v0_p2wpkh() && !scriptpubkey.is_v0_p2wsh())
40274023
}
40284024

40294025
const SERIALIZATION_VERSION: u8 = 1;

0 commit comments

Comments
 (0)