do not create change addresses in this thread; synchronize() should be sufficient
This commit is contained in:
@@ -632,15 +632,8 @@ class Wallet:
|
|||||||
outputs = [ (to_addr, amount) ]
|
outputs = [ (to_addr, amount) ]
|
||||||
change_amount = total - ( amount + fee )
|
change_amount = total - ( amount + fee )
|
||||||
if change_amount != 0:
|
if change_amount != 0:
|
||||||
# first look for unused change addresses
|
# normally, the update thread should ensure that the last change address is unused
|
||||||
for addr in self.change_addresses:
|
outputs.append( ( self.change_addresses[-1], change_amount) )
|
||||||
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) )
|
|
||||||
return outputs
|
return outputs
|
||||||
|
|
||||||
def sign_inputs( self, inputs, outputs, password ):
|
def sign_inputs( self, inputs, outputs, password ):
|
||||||
|
|||||||
Reference in New Issue
Block a user