Selaa lähdekoodia

verify transaction outputs of block reward transactions

Malte Kraus 8 vuotta sitten
vanhempi
sitoutus
30549e8053
1 muutettua tiedostoa jossa 1 lisäystä ja 4 poistoa
  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: