Skip to content

Commit 81ca8a3

Browse files
author
David
committed
Fix struct.unpack receiving an integer instead of a byte. stackoverflow.com/q/29299136/
1 parent 7a8a47e commit 81ca8a3

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(struct.unpack('<b',self[0])[0]).is_small_int()
683+
return 3 <= len(self) <= 42 and CScriptOp(struct.unpack('<b',self[0:1])[0]).is_small_int()
684684

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

0 commit comments

Comments
 (0)