Browse Source

taker: Account for off-by-one errors caused by rounding

There is some rounding thing that can cause `my_change_value` to be -1. This is not a big deal and should not cause an error. See https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/860#discussion_r617450511 for more info.
master
csH7KmCC9 5 years ago
parent
commit
43cc96042c
No known key found for this signature in database
GPG Key ID: 63B1CC785D3E57B1
  1. 2
      jmclient/jmclient/taker.py

2
jmclient/jmclient/taker.py

@ -486,7 +486,7 @@ class Taker(object):
#in SendPayment.create_tx(), but it is still a possibility if one maker
#uses a *lot* of inputs.
if self.my_change_addr:
if my_change_value < 0:
if my_change_value < -1:
raise ValueError("Calculated transaction fee of: " +
btc.amount_to_str(self.total_txfee) +
" is too large for our inputs; Please try again.")

Loading…
Cancel
Save