commit 44edb4e2bbe930bcab486835f2a0a1d46d1948e7
parent 3480cb9ef47c0cbfabeaec5b24e6f171e85dc251
Author: ThomasV <thomasv@gitorious>
Date: Sun, 29 Sep 2013 15:34:24 +0200
fix is_complete
Diffstat:
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -1658,7 +1658,7 @@ class ElectrumWindow(QMainWindow):
tx_dict = json.loads(str(txt))
assert "hex" in tx_dict.keys()
assert "complete" in tx_dict.keys()
- tx = Transaction(tx_dict["hex"])
+ tx = Transaction(tx_dict["hex"], tx_dict["complete"])
if not tx_dict["complete"]:
assert "input_info" in tx_dict.keys()
input_info = json.loads(tx_dict['input_info'])
diff --git a/lib/transaction.py b/lib/transaction.py
@@ -370,13 +370,13 @@ def get_address_from_output_script(bytes):
class Transaction:
- def __init__(self, raw):
+ def __init__(self, raw, is_complete = True):
self.raw = raw
self.deserialize()
self.inputs = self.d['inputs']
self.outputs = self.d['outputs']
self.outputs = map(lambda x: (x['address'],x['value']), self.outputs)
- self.is_complete = False
+ self.is_complete = is_complete
def __str__(self):
return self.raw
@@ -666,7 +666,6 @@ class Transaction:
def get_input_info(self):
info = []
for i in self.inputs:
- print len(i)
item = {
'prevout_hash':i['prevout_hash'],
'prevout_n':i['prevout_n'],