display locktime for transaction
authorMichael Wozniak <github@koh.ms>
Wed, 5 Mar 2014 21:04:31 +0000 (16:04 -0500)
committerMichael Wozniak <github@koh.ms>
Wed, 5 Mar 2014 21:38:34 +0000 (16:38 -0500)
display locktime for transactions if it is greater than 0.  Majority of
transactions will not display any value because default is 0.

gui/qt/transaction_dialog.py
lib/transaction.py

index a3ededf..6a7a1eb 100644 (file)
@@ -180,6 +180,9 @@ class TxDialog(QDialog):
 
     def add_io(self, vbox):
 
+        if self.tx.locktime > 0:
+            vbox.addWidget(QLabel("LockTime: %d\n" % self.tx.locktime))
+
         vbox.addWidget(QLabel(_("Inputs")))
         lines = map(lambda x: x.get('prevout_hash') + ":%d"%x.get('prevout_n') + u'\t' + "%s"%x.get('address') , self.tx.inputs )
         i_text = QTextEdit()
index 136303b..c9a1561 100644 (file)
@@ -376,6 +376,7 @@ class Transaction:
         self.inputs = self.d['inputs']
         self.outputs = self.d['outputs']
         self.outputs = map(lambda x: (x['address'],x['value']), self.outputs)
+        self.locktime = self.d['lockTime']
         self.is_complete = is_complete
         
     def __str__(self):