From cb44c5923a7c0ba15400d2b420faedd39cdce128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A8le=20Oul=C3=A8s?= Date: Thu, 1 Dec 2022 20:25:58 +0100 Subject: [PATCH] test: Add sendall test for min-fee setting --- test/functional/wallet_sendall.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/functional/wallet_sendall.py b/test/functional/wallet_sendall.py index 042b5dbf792..2221c395888 100755 --- a/test/functional/wallet_sendall.py +++ b/test/functional/wallet_sendall.py @@ -284,6 +284,12 @@ class SendallTest(BitcoinTestFramework): recipients=[self.remainder_target], fee_rate=100000) + @cleanup + def sendall_fails_on_low_fee(self): + self.log.info("Test sendall fails if the transaction fee is lower than the minimum fee rate setting") + assert_raises_rpc_error(-8, "Fee rate (0.999 sat/vB) is lower than the minimum fee rate setting (1.000 sat/vB)", + self.wallet.sendall, recipients=[self.recipient], fee_rate=0.999) + @cleanup def sendall_watchonly_specific_inputs(self): self.log.info("Test sendall with a subset of UTXO pool in a watchonly wallet") @@ -376,6 +382,9 @@ class SendallTest(BitcoinTestFramework): # Sendall fails when providing a fee that is too high self.sendall_fails_on_high_fee() + # Sendall fails when fee rate is lower than minimum + self.sendall_fails_on_low_fee() + # Sendall succeeds with watchonly wallets spending specific UTXOs self.sendall_watchonly_specific_inputs()