add tx.fee property back
This commit is contained in:
parent
d3a171e638
commit
1eb375ba80
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue