From 173e84611275a3f6e59adffea0429b7db6fbaae4 Mon Sep 17 00:00:00 2001 From: Chengcheng Zhang <943420582@qq.com> Date: Thu, 11 Apr 2019 13:36:24 +0800 Subject: [PATCH] fix bug --- pybtm/__init__.py | 2 +- pybtm/transaction.py | 4 ++-- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pybtm/__init__.py b/pybtm/__init__.py index a09894d..52f81bb 100644 --- a/pybtm/__init__.py +++ b/pybtm/__init__.py @@ -1,2 +1,2 @@ name = "pybtm" -version = "0.1.8" \ No newline at end of file +version = "0.1.9" \ No newline at end of file diff --git a/pybtm/transaction.py b/pybtm/transaction.py index acf3a43..f9e89ee 100644 --- a/pybtm/transaction.py +++ b/pybtm/transaction.py @@ -276,7 +276,7 @@ def decode_raw_tx(raw_transaction_str, network_str): offset = offset + 2 * length tx_input['control_program'] = raw_transaction_str[offset:offset+2*control_program_length] offset = offset + 2 * control_program_length - tx_input['address'] = get_address(tx_input['control_program'], network_str)['address'] + tx_input['address'] = get_address(tx_input['control_program'], network_str) _, length = get_uvarint(raw_transaction_str[offset:offset+18]) offset = offset + 2 * length witness_arguments_amount, length = get_uvarint(raw_transaction_str[offset:offset+18]) @@ -352,7 +352,7 @@ def decode_raw_tx(raw_transaction_str, network_str): offset = offset + 2 * length tx_output['control_program'] = raw_transaction_str[offset:offset+2*control_program_length] offset = offset + 2 * control_program_length - tx_output['address'] = get_address(tx_output['control_program'], network_str)['address'] + tx_output['address'] = get_address(tx_output['control_program'], network_str) _, length = get_uvarint(raw_transaction_str[offset:offset+18]) offset = offset + 2 * length prepare_output_id_hexstr = mux_id_hexstr + tx_output['asset_id'] + (tx_output['amount']).to_bytes(8, byteorder='little').hex() + (i).to_bytes(8, byteorder='little').hex() + '0100000000000000' + (control_program_length).to_bytes((control_program_length.bit_length() + 7) // 8, 'little').hex() + tx_output['control_program'] diff --git a/setup.py b/setup.py index d38b4aa..c88fcec 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as fh: setuptools.setup( name="pybtm", - version="0.1.8", + version="0.1.9", author="zcc0721", author_email="zcc0721@foxmail.com", description="Python3 implementation of the Bytom protocol.", -- 2.11.0