mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Merge bitcoin/bitcoin#26622: test: Add test for sendall min-fee setting
cb44c5923a
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: ACKcb44c5923a
ishaanam: ACKcb44c5923a
stickies-v: re-ACK [cb44c59
](cb44c5923a
) Tree-SHA512: 31978436e1f01cc6abf44addc62b6887e65611e9a7ae7dc72e6a73cdfdb3a6a4f0a6c53043b47ecd1b10fc902385a172921e68818a7f5061c96e5e1ef5280b48
This commit is contained in:
commit
cac29f5cd6
@ -284,6 +284,12 @@ class SendallTest(BitcoinTestFramework):
|
|||||||
recipients=[self.remainder_target],
|
recipients=[self.remainder_target],
|
||||||
fee_rate=100000)
|
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
|
@cleanup
|
||||||
def sendall_watchonly_specific_inputs(self):
|
def sendall_watchonly_specific_inputs(self):
|
||||||
self.log.info("Test sendall with a subset of UTXO pool in a watchonly wallet")
|
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
|
# Sendall fails when providing a fee that is too high
|
||||||
self.sendall_fails_on_high_fee()
|
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
|
# Sendall succeeds with watchonly wallets spending specific UTXOs
|
||||||
self.sendall_watchonly_specific_inputs()
|
self.sendall_watchonly_specific_inputs()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user