detect RBF transactions

This commit is contained in:
ThomasV 2016-01-17 14:28:17 +01:00
parent e2627e0944
commit 321ab10742
1 changed files with 3 additions and 0 deletions

View File

@ -698,6 +698,9 @@ class Transaction:
def get_fee(self):
return self.input_value() - self.output_value()
def is_final(self):
return not any([x.get('sequence') < 0xffffffff - 1 for x in self.inputs])
@classmethod
def fee_for_size(self, relay_fee, fee_per_kb, size):
'''Given a fee per kB in satoshis, and a tx size in bytes,