OSDN Git Service

fix fee bug
authorChengcheng Zhang <943420582@qq.com>
Fri, 15 Mar 2019 08:18:09 +0000 (16:18 +0800)
committerChengcheng Zhang <943420582@qq.com>
Fri, 15 Mar 2019 08:18:09 +0000 (16:18 +0800)
app/model/transaction.py

index e30b09f..2c2bcc6 100644 (file)
@@ -314,7 +314,8 @@ def decode_raw_tx(raw_tx_str, network_str):
         offset = offset + 64
         tx_output['amount'], length = get_uvarint(raw_tx_str[offset:offset+16])
         offset = offset + 2 * length
-        tx['fee'] -= tx_output['amount']
+        if tx_output['asset_id'] == 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff':
+            tx['fee'] -= tx_output['amount']
         _, length = get_uvarint(raw_tx_str[offset:offset+16])
         offset = offset + 2 * length
         control_program_length, length = get_uvarint(raw_tx_str[offset:offset+16])