Browse Source

Fixes bug introduced in ad8cd74ee9

The above commit added custom change addresses, however it
introduced a bug for multiple transaction schedules on the same
Taker object, as happens with tumbler for example: a new
change address would not be created for new transactions.
This commit fixes that and ensures a new change address is always
chosen when a custom change address was not specified for the
Taker object instantiation (which is always the case for tumbler).
master
Adam Gibson 5 years ago
parent
commit
b25d03c8d4
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 6
      jmclient/jmclient/taker.py

6
jmclient/jmclient/taker.py

@ -85,7 +85,7 @@ class Taker(object):
self.schedule = schedule
self.order_chooser = order_chooser
self.max_cj_fee = max_cj_fee
self.my_change_addr = custom_change_address
self.custom_change_address = custom_change_address
#List (which persists between transactions) of makers
#who have not responded or behaved maliciously at any
@ -291,7 +291,9 @@ class Taker(object):
#previously used for donations; TODO reimplement?
raise NotImplementedError
if self.cjamount != 0:
if self.my_change_addr is None:
if self.custom_change_address:
self.my_change_addr = self.custom_change_address
else:
try:
self.my_change_addr = self.wallet_service.get_internal_addr(self.mixdepth)
except:

Loading…
Cancel
Save