electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 76cf1fea7aecc97271433a49675e022c6543a76a
parent ceb0ce4b3a24571ff91f6c129b7d9efe2e2497d0
Author: ThomasV <thomasv@gitorious>
Date:   Mon, 14 Nov 2011 20:41:55 +0100

fix

Diffstat:
Mclient/electrum.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/electrum.py b/client/electrum.py @@ -286,7 +286,7 @@ class Wallet: for i in range(100000): oldseed = seed seed = hashlib.sha512(seed + oldseed).digest() - i = len( self.addresses ) + i = len( self.addresses ) - len(self.change_addresses) if not for_change else len(self.change_addresses) seed = Hash( "%d:%d:"%(i,for_change) + seed ) order = generator_secp256k1.order() secexp = ecdsa.util.randrange_from_seed__trytryagain( seed, order ) @@ -301,7 +301,7 @@ class Wallet: raise InvalidPassword("") self.private_keys = self.pw_encode( repr(private_keys), password) self.addresses.append(address) - if for_change: self.change_addresses.append( i ) + if for_change: self.change_addresses.append( len(self.addresses) - 1 ) h = self.retrieve_history(address) self.history[address] = h self.status[address] = h[-1]['blk_hash'] if h else None