1
0

fix paying to script

This commit is contained in:
SomberNight
2018-03-13 06:37:02 +01:00
parent 1f1ce26211
commit b043c872eb
2 changed files with 8 additions and 10 deletions

View File

@@ -93,9 +93,11 @@ class PayToEdit(ScanQRTextEdit):
for word in x.split():
if word[0:3] == 'OP_':
assert word in opcodes.lookup
script += chr(opcodes.lookup[word])
opcode_int = opcodes.lookup[word]
assert opcode_int < 256 # opcode is single-byte
script += bitcoin.int_to_hex(opcode_int)
else:
script += push_script(word).decode('hex')
script += push_script(word)
return script
def parse_amount(self, x):