Skip to content

Commit cac29f5

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#26622: test: Add test for sendall min-fee setting
cb44c59 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 cb44c59 ishaanam: ACK cb44c59 stickies-v: re-ACK [cb44c59](bitcoin/bitcoin@cb44c59) Tree-SHA512: 31978436e1f01cc6abf44addc62b6887e65611e9a7ae7dc72e6a73cdfdb3a6a4f0a6c53043b47ecd1b10fc902385a172921e68818a7f5061c96e5e1ef5280b48
2 parents 78aee0f + cb44c59 commit cac29f5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/functional/wallet_sendall.py

+9
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,12 @@ def sendall_fails_on_high_fee(self):
284284
recipients=[self.remainder_target],
285285
fee_rate=100000)
286286

287+
@cleanup
288+
def sendall_fails_on_low_fee(self):
289+
self.log.info("Test sendall fails if the transaction fee is lower than the minimum fee rate setting")
290+
assert_raises_rpc_error(-8, "Fee rate (0.999 sat/vB) is lower than the minimum fee rate setting (1.000 sat/vB)",
291+
self.wallet.sendall, recipients=[self.recipient], fee_rate=0.999)
292+
287293
@cleanup
288294
def sendall_watchonly_specific_inputs(self):
289295
self.log.info("Test sendall with a subset of UTXO pool in a watchonly wallet")
@@ -376,6 +382,9 @@ def run_test(self):
376382
# Sendall fails when providing a fee that is too high
377383
self.sendall_fails_on_high_fee()
378384

385+
# Sendall fails when fee rate is lower than minimum
386+
self.sendall_fails_on_low_fee()
387+
379388
# Sendall succeeds with watchonly wallets spending specific UTXOs
380389
self.sendall_watchonly_specific_inputs()
381390

0 commit comments

Comments
 (0)