Skip to content

Commit 5cd3467

Browse files
Surya BakshiBob McElrath
authored andcommitted
fixed issue in is_witness_scriptpubkey where self[0] is interpretted as str instead of the necessary int
1 parent 2b50596 commit 5cd3467

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitcoin/core/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ def is_p2sh(self):
680680
def is_witness_scriptpubkey(self):
681681
"""Returns true if this is a scriptpubkey signaling segregated witness
682682
data. """
683-
return 3 <= len(self) <= 42 and CScriptOp(self[0]).is_small_int()
683+
return 3 <= len(self) <= 42 and CScriptOp(struct.unpack('<b',self[0])[0]).is_small_int()
684684

685685
def witness_version(self):
686686
"""Returns the witness version on [0,16]. """

0 commit comments

Comments
 (0)