From 861c790fc10c2ac2c8fc20e6362b370bf372ea34 Mon Sep 17 00:00:00 2001 From: Matt Whitlock Date: Sun, 26 May 2024 16:41:51 -0400 Subject: [PATCH] maker: allow receiving more money than promised Fixes: https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1709 --- src/jmclient/maker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jmclient/maker.py b/src/jmclient/maker.py index 43c0ddc06..842e77481 100644 --- a/src/jmclient/maker.py +++ b/src/jmclient/maker.py @@ -230,12 +230,12 @@ def verify_unsigned_tx(self, tx, offerinfo): for outs in tx.vout: if outs.scriptPubKey == cjaddr_script: times_seen_cj_addr += 1 - if outs.nValue != amount: - return (False, 'Wrong cj_amount. I expect ' + str(amount)) + if outs.nValue < amount: + return (False, 'Wrong cj_amount. I expect >=' + str(amount)) if outs.scriptPubKey == changeaddr_script: times_seen_change_addr += 1 - if outs.nValue != expected_change_value: - return (False, 'wrong change, i expect ' + str( + if outs.nValue < expected_change_value: + return (False, 'Wrong change. I expect >=' + str( expected_change_value)) if times_seen_cj_addr != 1 or times_seen_change_addr != 1: fmt = ('cj or change addr not in tx '