浏览代码

verify transaction outputs of block reward transactions

Malte Kraus 8 年之前
父节点
当前提交
30549e8053
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      src/transaction.py

+ 1 - 4
src/transaction.py

@@ -195,10 +195,7 @@ class Transaction:
         """
         Verifies that the receivers get less or equal money than the senders.
         """
-        if not self.inputs:
-            return True
-
-        if self.get_transaction_fee(chain) < 0:
+        if self.inputs and self.get_transaction_fee(chain) < 0:
             logging.warning("Transferred amounts are larger than the inputs.")
             return False
         for outp in self.targets: