OSDN Git Service

add asset definition
authorChengcheng Zhang <943420582@qq.com>
Thu, 14 Mar 2019 12:22:05 +0000 (20:22 +0800)
committerChengcheng Zhang <943420582@qq.com>
Thu, 14 Mar 2019 12:22:05 +0000 (20:22 +0800)
app/model/transaction.py

index 39dd150..e30b09f 100644 (file)
@@ -222,7 +222,7 @@ def decode_raw_tx(raw_tx_str, network_str):
             offset = offset + 2 * length
             asset_definition_size, length = get_uvarint(raw_tx_str[offset:offset+16])
             offset = offset + 2 * length
-            tx_input['asset_definition'] = raw_tx_str[offset:offset+2*asset_definition_size]
+            tx_input['asset_definition'] = bytes.fromhex(raw_tx_str[offset:offset+2*asset_definition_size]).decode()
             offset = offset + 2 * asset_definition_size
             _, length = get_uvarint(raw_tx_str[offset:offset+16])
             offset = offset + 2 * length