From 7f1e94211410f998ec8023977e9323a55f6b87f9 Mon Sep 17 00:00:00 2001 From: Aleksey Karpov Date: Tue, 27 Nov 2018 00:34:44 +0400 Subject: [PATCH] add_input, sign_input bug fix (private_key store) --- pybtc/transaction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybtc/transaction.py b/pybtc/transaction.py index 3b223f4..16fe078 100644 --- a/pybtc/transaction.py +++ b/pybtc/transaction.py @@ -468,7 +468,7 @@ class Transaction(dict): if amount: self["vIn"][k]["value"] = amount if private_key: - self["vIn"][k].private_key = private_key + self["vIn"][k]["private_key"] = private_key if self.auto_commit: self.commit() return self @@ -564,7 +564,7 @@ class Transaction(dict): # private key if not private_key: try: - private_key = self["vIn"][n].private_key.key + private_key = self["vIn"][n]["private_key"].key except: raise RuntimeError("no private key") if isinstance(private_key, list):