add tx.fee property back

This commit is contained in:
Lex Berezhny 2018-08-03 12:29:02 -04:00
parent d3a171e638
commit 1eb375ba80

View file

@ -293,6 +293,10 @@ class BaseTransaction:
def output_sum(self):
return sum(o.amount for o in self.outputs)
@property
def fee(self):
return self.input_sum - self.output_sum
def get_base_fee(self, ledger):
""" Fee for base tx excluding inputs and outputs. """
return self.base_size * ledger.fee_per_byte