From 43cc96042c2924bd00502cc342e0637d8de4e031 Mon Sep 17 00:00:00 2001 From: csH7KmCC9 Date: Sun, 9 May 2021 08:05:36 +0000 Subject: [PATCH] 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. --- jmclient/jmclient/taker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jmclient/jmclient/taker.py b/jmclient/jmclient/taker.py index 6a3b0d7..e27fa04 100644 --- a/jmclient/jmclient/taker.py +++ b/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.")