From 321ab1074232e91594aa8564d9b6a18170e11c3d Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sun, 17 Jan 2016 14:28:17 +0100 Subject: [PATCH] detect RBF transactions --- lib/transaction.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/transaction.py b/lib/transaction.py index 219e8946..9a1d43c6 100644 --- a/lib/transaction.py +++ b/lib/transaction.py @@ -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,