1
0

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

This commit is contained in:
ThomasV
2012-01-15 13:41:29 +03:00
parent 9e2e8ef411
commit 754fdcfa50

View File

@@ -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 ):