Skip to content

Commit

Permalink
fixed bug in issue JoinMarket-Org#86, and for patientsendpayment
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-belcher committed May 24, 2015
1 parent fb4146d commit c7edaff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion patientsendpayment.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def run(self):
#cancel the remaining order
self.tmaker.modify_orders([0], [])
orders, total_cj_fee = choose_order(self.tmaker.db, self.tmaker.amount,
self.tmaker.makercount)
self.tmaker.makercount,
weighted_order_choose)
print 'chosen orders to fill ' + str(orders) + ' totalcjfee=' + str(
total_cj_fee)
total_amount = self.tmaker.amount + total_cj_fee + self.tmaker.txfee
Expand Down
8 changes: 3 additions & 5 deletions tumbler.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,10 @@ def send_tx(self, tx, balance, sweep):
)[tx['srcmixdepth']]
total_value = sum([addrval['value'] for addrval in all_utxos.values(
)])
orders, cjamount = choose_sweep_order(
self.taker.db, total_value, self.taker.txfee, tx['makercount'])
while True:
#orders, total_cj_fee = choose_order(self.taker.db, amount, tx['makercount'])
orders, cjamount = choose_sweep_order(
self.taker.db, total_value, self.taker.txfee,
tx['makercount'])
tx['makercount'], weighted_order_choose)
if orders == None:
print 'waiting for liquidity'
time.sleep(10)
Expand All @@ -154,7 +151,8 @@ def send_tx(self, tx, balance, sweep):
print 'coinjoining ' + str(amount)
while True:
orders, total_cj_fee = choose_order(self.taker.db, amount,
tx['makercount'])
tx['makercount'],
weighted_order_choose)
cj_fee = 1.0 * total_cj_fee / tx['makercount'] / amount
print 'average fee = ' + str(cj_fee)
if cj_fee > self.taker.maxcjfee:
Expand Down

0 comments on commit c7edaff

Please sign in to comment.