diff --git a/bitcoin/core/script.py b/bitcoin/core/script.py index ffd97b8b..156843ee 100644 --- a/bitcoin/core/script.py +++ b/bitcoin/core/script.py @@ -678,9 +678,23 @@ def is_p2sh(self): _bord(self[22]) == OP_EQUAL) def is_witness_scriptpubkey(self): - """Returns true if this is a scriptpubkey signaling segregated witness - data. """ - return 3 <= len(self) <= 42 and CScriptOp(struct.unpack(' 42: + return False + + head = struct.unpack('