Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
create new orders for each new identity
Browse files Browse the repository at this point in the history
  • Loading branch information
nukaa committed Feb 8, 2016
1 parent 6f8ad11 commit f544fd4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion joinmarket/irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def __init__(self,
self.reconnect_delay = 30
self.newnyms = False
try:
self.reconnect_delaty = int(config.get("MESSAGING", "reconnect_delay"))
self.reconnect_delay = int(config.get("MESSAGING", "reconnect_delay"))
self.newnyms = (config.get("MESSAGING", "newnym").lower() == 'true')
self.tor_ctrl_host = config.get("MESSAGING", "tor_ctrl_host")
self.tor_ctrl_port = int(config.get("MESSAGING", "tor_ctrl_port"))
Expand Down
5 changes: 4 additions & 1 deletion joinmarket/maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ def __init__(self, msgchan, wallet):
self.active_orders = {}
self.wallet = wallet
self.nextoid = -1
self.orderlist = self.create_my_orders()
if not self.msgchan.newnyms:
self.orderlist = self.create_my_orders()
self.wallet_unspent_lock = threading.Lock()

def get_crypto_box_from_nick(self, nick):
Expand Down Expand Up @@ -265,6 +266,8 @@ def on_push_tx(self, nick, txhex):
self.msgchan.send_error(nick, 'Unable to push tx')

def on_welcome(self):
if self.msgchan.newnyms:
self.orderlist = self.create_my_orders()
self.msgchan.announce_orders(self.orderlist)
self.active_orders = {}

Expand Down
2 changes: 2 additions & 0 deletions joinmarket/message_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def __init__(self):
self.on_seen_auth = None
self.on_seen_tx = None
self.on_push_tx = None
# chan-specific attributes
self.newnyms = False

def run(self):
pass
Expand Down

0 comments on commit f544fd4

Please sign in to comment.