aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_fee_estimation.py
diff options
context:
space:
mode:
authorAntoine Poinsot <darosior@protonmail.com>2021-09-20 19:22:03 +0200
committerAntoine Poinsot <darosior@protonmail.com>2021-12-09 13:04:07 +0100
commit19dd91a9bec77b14ff5b883d3e185b6b4a081ef7 (patch)
treebe5937ef3b15b6bd48bd62cf6288a5487899f185 /test/functional/feature_fee_estimation.py
parent7908772244b90884249da90e05f0044cc7d555dd (diff)
downloadbitcoin-19dd91a9bec77b14ff5b883d3e185b6b4a081ef7.tar.xz
qa: remove a redundant condition in fee estimation test
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
Diffstat (limited to 'test/functional/feature_fee_estimation.py')
-rwxr-xr-xtest/functional/feature_fee_estimation.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/functional/feature_fee_estimation.py b/test/functional/feature_fee_estimation.py
index 46d5bcf1a6..e36b0e387d 100755
--- a/test/functional/feature_fee_estimation.py
+++ b/test/functional/feature_fee_estimation.py
@@ -67,13 +67,12 @@ def small_txpuzzle_randfee(from_node, conflist, unconflist, amount, min_fee, fee
t = conflist.pop(0)
total_in += t["amount"]
tx.vin.append(CTxIn(COutPoint(int(t["txid"], 16), t["vout"]), b""))
+ while total_in <= (amount + fee) and len(unconflist) > 0:
+ t = unconflist.pop(0)
+ total_in += t["amount"]
+ tx.vin.append(CTxIn(COutPoint(int(t["txid"], 16), t["vout"]), b""))
if total_in <= amount + fee:
- while total_in <= (amount + fee) and len(unconflist) > 0:
- t = unconflist.pop(0)
- total_in += t["amount"]
- tx.vin.append(CTxIn(COutPoint(int(t["txid"], 16), t["vout"]), b""))
- if total_in <= amount + fee:
- raise RuntimeError(f"Insufficient funds: need {amount + fee}, have {total_in}")
+ raise RuntimeError(f"Insufficient funds: need {amount + fee}, have {total_in}")
tx.vout.append(CTxOut(int((total_in - amount - fee) * COIN), P2SH_1))
tx.vout.append(CTxOut(int(amount * COIN), P2SH_2))
# These transactions don't need to be signed, but we still have to insert