1
0

remove --broadcast option for payto, and parse transactions from json 'hex' field

This commit is contained in:
ThomasV
2015-10-20 13:08:32 +02:00
parent 691fc54370
commit fbb65416d3
2 changed files with 12 additions and 14 deletions

View File

@@ -470,7 +470,14 @@ class Transaction:
return self.raw
def __init__(self, raw):
self.raw = raw.strip() if raw else None
if raw is None:
self.raw = None
elif type(raw) in [str, unicode]:
self.raw = raw.strip() if raw else None
elif type(raw) is dict:
self.raw = raw['hex']
else:
raise BaseException("cannot initialize transaction", raw)
self.inputs = None
def update(self, raw):