1
0

transaction: replace custom enum type for opcodes with stdlib enum

based on Electron-Cash/Electron-Cash@99e60b4941
This commit is contained in:
SomberNight
2019-02-22 16:52:08 +01:00
parent 9dedf51afd
commit c03c17f1c7
2 changed files with 133 additions and 72 deletions

View File

@@ -95,8 +95,7 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit, PrintError):
script = ''
for word in x.split():
if word[0:3] == 'OP_':
assert word in opcodes.lookup
opcode_int = opcodes.lookup[word]
opcode_int = opcodes[word]
assert opcode_int < 256 # opcode is single-byte
script += bitcoin.int_to_hex(opcode_int)
else: