Skip to content

Commit

Permalink
fix tests with python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouziel committed Mar 5, 2024
1 parent c433627 commit 78f6e3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions counterparty-lib/counterpartylib/lib/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ def script_to_asm(scriptpubkey):
script = bytes(scriptpubkey, 'utf-8') if type(scriptpubkey) == str else bytes(scriptpubkey)
asm = utils.script_to_asm(script)
if asm[-1] == OP_CHECKMULTISIG:
asm[-2] = int.from_bytes(asm[-2])
asm[0] = int.from_bytes(asm[0])
asm[-2] = int.from_bytes(asm[-2], 'big')
asm[0] = int.from_bytes(asm[0], 'big')
return asm
except BaseException as e:
raise exceptions.DecodeError('invalid script')
Expand Down

0 comments on commit 78f6e3d

Please sign in to comment.