electrum

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

commit 754fdcfa5098a860811809eaba9f2486150750d6
parent 9e2e8ef411c60162a03bfe4dab2acdfe9019a10c
Author: ThomasV <thomasv@gitorious>
Date:   Sun, 15 Jan 2012 13:41:29 +0300

do not create change addresses in this thread; synchronize() should be sufficient

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

diff --git a/client/electrum.py b/client/electrum.py @@ -632,15 +632,8 @@ class Wallet: outputs = [ (to_addr, amount) ] change_amount = total - ( amount + fee ) if change_amount != 0: - # first look for unused change addresses - for addr in self.change_addresses: - if self.history.get(addr): continue - change_address = addr - break - else: - change_address = self.create_new_address2(True) - print "new change address", change_address - outputs.append( (change_address, change_amount) ) + # normally, the update thread should ensure that the last change address is unused + outputs.append( ( self.change_addresses[-1], change_amount) ) return outputs def sign_inputs( self, inputs, outputs, password ):