add_input, sign_input bug fix (private_key store)
This commit is contained in:
parent
b138e58ed1
commit
7f1e942114
@ -468,7 +468,7 @@ class Transaction(dict):
|
|||||||
if amount:
|
if amount:
|
||||||
self["vIn"][k]["value"] = amount
|
self["vIn"][k]["value"] = amount
|
||||||
if private_key:
|
if private_key:
|
||||||
self["vIn"][k].private_key = private_key
|
self["vIn"][k]["private_key"] = private_key
|
||||||
if self.auto_commit:
|
if self.auto_commit:
|
||||||
self.commit()
|
self.commit()
|
||||||
return self
|
return self
|
||||||
@ -564,7 +564,7 @@ class Transaction(dict):
|
|||||||
# private key
|
# private key
|
||||||
if not private_key:
|
if not private_key:
|
||||||
try:
|
try:
|
||||||
private_key = self["vIn"][n].private_key.key
|
private_key = self["vIn"][n]["private_key"].key
|
||||||
except:
|
except:
|
||||||
raise RuntimeError("no private key")
|
raise RuntimeError("no private key")
|
||||||
if isinstance(private_key, list):
|
if isinstance(private_key, list):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user