From 337fe029fde55751139bf53bcf099851f05777d6 Mon Sep 17 00:00:00 2001 From: Jochen Hoenicke Date: Sun, 10 May 2015 16:05:31 +0200 Subject: [PATCH] insight api: use hex code The insight api transaction parser used to look at the assembly to reconstruct the input and output scripts. This patch changes it to use the hex input directly. This fixes parsing some instructions with unknown opcodes (e.g. multisig inputs with "0" opcode). --- trezorlib/tx_api.py | 46 ++------------------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/trezorlib/tx_api.py b/trezorlib/tx_api.py index 55d39c189..6d07fd90e 100644 --- a/trezorlib/tx_api.py +++ b/trezorlib/tx_api.py @@ -5,44 +5,6 @@ from decimal import Decimal from filecache import filecache, DAY import types_pb2 as proto_types -def op_push_data(data): - l = len(data) - if l < 0x4C: - return chr(l) + data - elif i < 0xFF: - return '\x4C' + chr(l) + data - elif i < 0xFFFF: - return '\x4D' + struct.pack("