aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2022-12-03 12:19:55 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2022-12-03 12:28:13 +0100
commitcac29f5cd66f005ce65edd697990d495a904a1f1 (patch)
tree57a50a17e91ad1068c7ceaffb7d21f2ef70bf9c3
parent78aee0fe2ca72e7bc0f36e7479574ebc1f6a9bee (diff)
parentcb44c5923a7c0ba15400d2b420faedd39cdce128 (diff)
Merge bitcoin/bitcoin#26622: test: Add test for sendall min-fee setting
cb44c5923a7c0ba15400d2b420faedd39cdce128 test: Add sendall test for min-fee setting (Aurèle Oulès) Pull request description: While experimenting with mutation testing it appeared that the minimum fee-rate check was not tested for the `sendall` RPC. https://bcm-ui.aureleoules.com/mutations/3581479318544ea6b97f788cec6e6ef1 ACKs for top commit: 0xB10C: ACK cb44c5923a7c0ba15400d2b420faedd39cdce128 ishaanam: ACK cb44c5923a7c0ba15400d2b420faedd39cdce128 stickies-v: re-ACK [cb44c59](https://github.com/bitcoin/bitcoin/commit/cb44c5923a7c0ba15400d2b420faedd39cdce128) Tree-SHA512: 31978436e1f01cc6abf44addc62b6887e65611e9a7ae7dc72e6a73cdfdb3a6a4f0a6c53043b47ecd1b10fc902385a172921e68818a7f5061c96e5e1ef5280b48
-rwxr-xr-xtest/functional/wallet_sendall.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/wallet_sendall.py b/test/functional/wallet_sendall.py
index 042b5dbf79..2221c39588 100755
--- a/test/functional/wallet_sendall.py
+++ b/test/functional/wallet_sendall.py
@@ -285,6 +285,12 @@ class SendallTest(BitcoinTestFramework):
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")
self.add_utxos([17, 4])
@@ -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()