Python3 implementation of the Bytom protocol. https://pypi.org/project/pybtm/
Révision | 173e84611275a3f6e59adffea0429b7db6fbaae4 (tree) |
---|---|
l'heure | 2019-04-11 14:36:24 |
Auteur | Chengcheng Zhang <943420582@qq.c...> |
Commiter | Chengcheng Zhang |
fix bug
@@ -1,2 +1,2 @@ | ||
1 | 1 | name = "pybtm" |
2 | -version = "0.1.8" | |
\ No newline at end of file | ||
2 | +version = "0.1.9" | |
\ No newline at end of file |
@@ -276,7 +276,7 @@ def decode_raw_tx(raw_transaction_str, network_str): | ||
276 | 276 | offset = offset + 2 * length |
277 | 277 | tx_input['control_program'] = raw_transaction_str[offset:offset+2*control_program_length] |
278 | 278 | offset = offset + 2 * control_program_length |
279 | - tx_input['address'] = get_address(tx_input['control_program'], network_str)['address'] | |
279 | + tx_input['address'] = get_address(tx_input['control_program'], network_str) | |
280 | 280 | _, length = get_uvarint(raw_transaction_str[offset:offset+18]) |
281 | 281 | offset = offset + 2 * length |
282 | 282 | 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): | ||
352 | 352 | offset = offset + 2 * length |
353 | 353 | tx_output['control_program'] = raw_transaction_str[offset:offset+2*control_program_length] |
354 | 354 | offset = offset + 2 * control_program_length |
355 | - tx_output['address'] = get_address(tx_output['control_program'], network_str)['address'] | |
355 | + tx_output['address'] = get_address(tx_output['control_program'], network_str) | |
356 | 356 | _, length = get_uvarint(raw_transaction_str[offset:offset+18]) |
357 | 357 | offset = offset + 2 * length |
358 | 358 | 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'] |
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh: | ||
5 | 5 | |
6 | 6 | setuptools.setup( |
7 | 7 | name="pybtm", |
8 | - version="0.1.8", | |
8 | + version="0.1.9", | |
9 | 9 | author="zcc0721", |
10 | 10 | author_email="zcc0721@foxmail.com", |
11 | 11 | description="Python3 implementation of the Bytom protocol.", |