Skip to content

Commit 96dd697

Browse files
wanwenliWan Wenli
authored andcommitted
fix checking on p2sh-p2wsh
1 parent 05cbb3c commit 96dd697

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bitcoin/core/script.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -691,16 +691,16 @@ def is_witness_v0_keyhash(self):
691691
return len(self) == 22 and self[0:2] == b'\x00\x14'
692692

693693
def is_witness_v0_nested_keyhash(self):
694-
"""Returns true if this is a scriptpubkey for V0 P2WPKH embedded in P2SH. """
694+
"""Returns true if this is a scriptSig for V0 P2WPKH embedded in P2SH. """
695695
return len(self) == 23 and self[0:3] == b'\x16\x00\x14'
696696

697697
def is_witness_v0_scripthash(self):
698698
"""Returns true if this is a scriptpubkey for V0 P2WSH. """
699699
return len(self) == 34 and self[0:2] == b'\x00\x20'
700700

701701
def is_witness_v0_nested_scripthash(self):
702-
"""Returns true if this is a scriptpubkey for V0 P2WSH embedded in P2SH. """
703-
return len(self) == 23 and self[0:2] == b'\xa9\x14' and self[-1] == b'\x87'
702+
"""Returns true if this is a scriptSig for V0 P2WSH embedded in P2SH. """
703+
return len(self) == 35 and self[0:3] == b'\x22\x00\x20'
704704

705705
def is_push_only(self):
706706
"""Test if the script only contains pushdata ops

0 commit comments

Comments
 (0)