commit 16344b43af5b43eacda22af1272f27588dd281ec
parent bf50bc45efea162a01583ea47a20791494909dc5
Author: ThomasV <thomasv@gitorious>
Date: Thu, 11 Jun 2015 08:56:07 +0200
fix issue #1282
Diffstat:
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/lib/commands.py b/lib/commands.py
@@ -131,7 +131,7 @@ class Commands:
def make_seed(self, nbits=128, entropy=1, language=None):
"""Create a seed"""
from mnemonic import Mnemonic
- s = Mnemonic(language).make_seed(nbits, custom_entropy=custom_entropy)
+ s = Mnemonic(language).make_seed(nbits, custom_entropy=entropy)
return s.encode('utf8')
@command('')
diff --git a/lib/transaction.py b/lib/transaction.py
@@ -705,13 +705,12 @@ class Transaction:
def sign(self, keypairs):
for i, txin in enumerate(self.inputs):
- signatures = filter(None, txin['signatures'])
num = txin['num_sig']
- if len(signatures) == num:
- # continue if this txin is complete
- continue
-
for x_pubkey in txin['x_pubkeys']:
+ signatures = filter(None, txin['signatures'])
+ if len(signatures) == num:
+ # txin is complete
+ break
if x_pubkey in keypairs.keys():
print_error("adding signature for", x_pubkey)
# add pubkey to txin
@@ -733,7 +732,6 @@ class Transaction:
assert public_key.verify_digest( sig, for_sig, sigdecode = ecdsa.util.sigdecode_der)
txin['signatures'][ii] = sig.encode('hex')
self.inputs[i] = txin
-
print_error("is_complete", self.is_complete())
self.raw = self.serialize()