File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -260,9 +260,13 @@ impl NegotiationContext {
260
260
// with witness versions V1 and up are always considered standard. Yes, the scripts can be
261
261
// anyone-can-spend-able, but if our counterparty wants to add an output like that then it's none
262
262
// of our concern really ¯\_(ツ)_/¯
263
- if !msg. script . is_v0_p2wpkh ( )
264
- && !msg. script . is_v0_p2wsh ( )
265
- && msg. script . witness_version ( ) . map ( |v| v. to_num ( ) < 1 ) . unwrap_or ( true )
263
+ //
264
+ // TODO: The last check would be simplified when https://github.com/rust-bitcoin/rust-bitcoin/commit/1656e1a09a1959230e20af90d20789a4a8f0a31b
265
+ // hits the next release of rust-bitcoin.
266
+ if !( msg. script . is_v0_p2wpkh ( )
267
+ || msg. script . is_v0_p2wsh ( )
268
+ || ( msg. script . is_witness_program ( )
269
+ && msg. script . witness_version ( ) . map ( |v| v. to_num ( ) >= 1 ) . unwrap_or ( false ) ) )
266
270
{
267
271
return Err ( AbortReason :: InvalidOutputScript ) ;
268
272
}
You can’t perform that action at this time.
0 commit comments