Skip to content

Commit 71f1002

Browse files
committed
f allow any witness script output from counterparty
1 parent 7c7b54c commit 71f1002

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lightning/src/ln/interactivetxs.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,13 @@ impl NegotiationContext {
233233
return Err(AbortReason::ExceededMaximumSatsAllowed);
234234
}
235235

236-
// The receiving node:
236+
// According to the current spec, a receiving node:
237237
// - MUST accept P2WSH, P2WPKH, P2TR scripts
238238
// - MAY fail the negotiation if script is non-standard
239+
//
240+
// However, all witness scripts are standard now, and we don't really care if the sender
241+
// wants to add an output with a witness V2+ script that could be spent by anyone.
242+
// That's none of our business really ¯\_(ツ)_/¯
239243
if !msg.script.is_v0_p2wpkh() && !msg.script.is_v0_p2wsh() && !msg.script.is_v1_p2tr() {
240244
return Err(AbortReason::InvalidOutputScript);
241245
}

0 commit comments

Comments
 (0)