tsupport locktime - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 461cbd357a71659ccacdcc5140a321f8a67c645b DIR parent ede1fbdb1f0ceeace6adcc139396101d3fed9d8a HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 18 May 2016 11:58:27 +0200 support locktime Diffstat: M lib/transaction.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/transaction.py b/lib/transaction.py t@@ -489,6 +489,7 @@ class Transaction: raise BaseException("cannot initialize transaction", raw) self._inputs = None self._outputs = None + self.locktime = 0 def update(self, raw): self.raw = raw t@@ -693,7 +694,7 @@ class Transaction: script = self.pay_script(output_type, addr) s += var_int(len(script)/2) # script length s += script # script - s += int_to_hex(0, 4) # lock time + s += int_to_hex(self.locktime, 4) # locktime if for_sig is not None and for_sig != -1: s += int_to_hex(1, 4) # hash type return s t@@ -833,7 +834,8 @@ class Transaction: self.deserialize() out = { 'hex': self.raw, - 'complete': self.is_complete() + 'complete': self.is_complete(), + 'final': self.is_final(), } return out