aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorishaanam <ishaana.misra@gmail.com>2022-09-13 17:24:03 -0400
committerishaanam <ishaana.misra@gmail.com>2022-09-13 18:12:42 -0400
commit6f8e3818af7585b961039bf0c768be2e4ee44e0f (patch)
tree29b662e297dc23a7a70e9e5d07bfc7436436afb5 /test/functional
parent29d540b7ada890dd588c4825d40c27c5e6f20061 (diff)
sendall: check if the maxtxfee has been exceeded
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/wallet_sendall.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/wallet_sendall.py b/test/functional/wallet_sendall.py
index aa8d2a9d2c..f24329f7b3 100755
--- a/test/functional/wallet_sendall.py
+++ b/test/functional/wallet_sendall.py
@@ -264,6 +264,18 @@ class SendallTest(BitcoinTestFramework):
recipients=[self.remainder_target],
options={"inputs": [utxo], "send_max": True})
+ @cleanup
+ def sendall_fails_on_high_fee(self):
+ self.log.info("Test sendall fails if the transaction fee exceeds the maxtxfee")
+ self.add_utxos([21])
+
+ assert_raises_rpc_error(
+ -4,
+ "Fee exceeds maximum configured by user",
+ self.wallet.sendall,
+ recipients=[self.remainder_target],
+ fee_rate=100000)
+
def run_test(self):
self.nodes[0].createwallet("activewallet")
self.wallet = self.nodes[0].get_wallet_rpc("activewallet")
@@ -312,5 +324,8 @@ class SendallTest(BitcoinTestFramework):
# Sendall fails when using send_max while specifying inputs
self.sendall_fails_on_specific_inputs_with_send_max()
+ # Sendall fails when providing a fee that is too high
+ self.sendall_fails_on_high_fee()
+
if __name__ == '__main__':
SendallTest().main()