Skip to content

Commit

Permalink
test: fix 'unknown named parameter' test in wallet_basic
Browse files Browse the repository at this point in the history
Fixes loop when testing an unknown named parameter.
  • Loading branch information
brunoerg committed Aug 21, 2023
1 parent 6ce5e8f commit 452c094
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions test/functional/wallet_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,7 @@ def run_test(self):
node_0_bal += amount
assert_equal(self.nodes[0].getbalance(), node_0_bal)

for key in ["totalFee", "feeRate"]:
assert_raises_rpc_error(-8, "Unknown named parameter key", self.nodes[2].sendtoaddress, address=address, amount=1, fee_rate=1, key=1)
assert_raises_rpc_error(-8, "Unknown named parameter feeRate", self.nodes[2].sendtoaddress, address=address, amount=1, fee_rate=1, feeRate=1)

# Test setting explicit fee rate just below the minimum.
self.log.info("Test sendmany raises 'fee rate too low' if fee_rate of 0.99999999 is passed")
Expand Down Expand Up @@ -505,9 +504,6 @@ def run_test(self):
fee = prebalance - postbalance - amount
assert_fee_amount(fee, tx_size, Decimal(fee_rate_btc_kvb))

for key in ["totalFee", "feeRate"]:
assert_raises_rpc_error(-8, "Unknown named parameter key", self.nodes[2].sendtoaddress, address=address, amount=1, fee_rate=1, key=1)

# Test setting explicit fee rate just below the minimum.
self.log.info("Test sendtoaddress raises 'fee rate too low' if fee_rate of 0.99999999 is passed")
assert_raises_rpc_error(-6, "Fee rate (0.999 sat/vB) is lower than the minimum fee rate setting (1.000 sat/vB)",
Expand Down

0 comments on commit 452c094

Please sign in to comment.