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