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 616eaa6 commit 3d8d457
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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 3d8d457

Please sign in to comment.