Merge bitcoin/bitcoin#22742: test: Use proper target in do_fund_send

8dcbbbea6486e9ab7d5e7397b82585141f9910bf test: fix bug in 22686 (S3RK)

Pull request description:

  It seems there is a bug in the test in #22686, the code behaviour itself looks correct.

  Instead of verifying the scenario from #22670 with both `upper_bound` and `lower_bound` for the transaction amount, the tests verified `lower_bound` two times. This fix is to properly use function parameter instead of a variable from the scope. The test still passes with both values, so no code changes are required.

ACKs for top commit:
  achow101:
    ACK 8dcbbbea6486e9ab7d5e7397b82585141f9910bf

Tree-SHA512: 82837b2e00bd075a7b6b7a31031f4d3ba1ab4bd5967e90488f527fcc618aeb3945d6ae3ed66b9eb11616dda3ef376c5001559d2a7a79a759fc6800358bf52537
This commit is contained in:
MarcoFalke 2021-08-19 19:16:04 +02:00
commit 92f3a4b4d0
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -1006,7 +1006,7 @@ class RawTransactionsTest(BitcoinTestFramework):
assert_greater_than(fees, 0.01)
def do_fund_send(target):
create_tx = tester.createrawtransaction([], [{funds.getnewaddress(): lower_bound}])
create_tx = tester.createrawtransaction([], [{funds.getnewaddress(): target}])
funded_tx = tester.fundrawtransaction(create_tx)
signed_tx = tester.signrawtransactionwithwallet(funded_tx["hex"])
assert signed_tx["complete"]