aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_bumpfee.py
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-12-04 11:28:47 +0100
committerJon Atack <jon@atack.com>2021-05-06 09:06:27 +0200
commitea6f76b66ecc52360719053489e0ec9f9a673eab (patch)
tree4dfb3f0ec253a4818bc661699a38d1ed3a4b2549 /test/functional/wallet_bumpfee.py
parent9c05da4a5c57d7fd0fc53817ad6f0a07c0f08b5b (diff)
test: improve zero-value explicit fee rate coverage
Diffstat (limited to 'test/functional/wallet_bumpfee.py')
-rwxr-xr-xtest/functional/wallet_bumpfee.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/wallet_bumpfee.py b/test/functional/wallet_bumpfee.py
index 0d1b6c54ce..d2005140a4 100755
--- a/test/functional/wallet_bumpfee.py
+++ b/test/functional/wallet_bumpfee.py
@@ -110,9 +110,13 @@ class BumpFeeTest(BitcoinTestFramework):
assert_raises_rpc_error(-8, "Insufficient total fee 0.00000141", rbf_node.bumpfee, rbfid, {"fee_rate": INSUFFICIENT})
self.log.info("Test invalid fee rate settings")
- assert_raises_rpc_error(-8, "Insufficient total fee 0.00", rbf_node.bumpfee, rbfid, {"fee_rate": 0})
assert_raises_rpc_error(-4, "Specified or calculated fee 0.141 is too high (cannot be higher than -maxtxfee 0.10",
rbf_node.bumpfee, rbfid, {"fee_rate": TOO_HIGH})
+ # Test fee_rate with zero values.
+ msg = "Insufficient total fee 0.00"
+ for zero_value in [0, 0.000, 0.00000000, "0", "0.000", "0.00000000"]:
+ assert_raises_rpc_error(-8, msg, rbf_node.bumpfee, rbfid, {"fee_rate": zero_value})
+ # Test fee_rate out of range (negative number).
assert_raises_rpc_error(-3, "Amount out of range", rbf_node.bumpfee, rbfid, {"fee_rate": -1})
for value in [{"foo": "bar"}, True]:
assert_raises_rpc_error(-3, "Amount is not a number or string", rbf_node.bumpfee, rbfid, {"fee_rate": value})