aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_fundrawtransaction.py
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-12-03 10:55:15 +0100
committerJon Atack <jon@atack.com>2021-05-09 12:49:47 +0200
commitc5fd4344f7fcc257062a610c8ff26ffcc9b53953 (patch)
tree1c764d5f3df844da1dcc162102213ce7feb9d532 /test/functional/rpc_fundrawtransaction.py
parentea6f76b66ecc52360719053489e0ec9f9a673eab (diff)
downloadbitcoin-c5fd4344f7fcc257062a610c8ff26ffcc9b53953.tar.xz
test: explicit fee rates with invalid amounts
Diffstat (limited to 'test/functional/rpc_fundrawtransaction.py')
-rwxr-xr-xtest/functional/rpc_fundrawtransaction.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/rpc_fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py
index 90c5d5bad2..345c20389c 100755
--- a/test/functional/rpc_fundrawtransaction.py
+++ b/test/functional/rpc_fundrawtransaction.py
@@ -768,8 +768,9 @@ class RawTransactionsTest(BitcoinTestFramework):
node.fundrawtransaction, rawtx, {param: -1, "add_inputs": True})
assert_raises_rpc_error(-3, "Amount is not a number or string",
node.fundrawtransaction, rawtx, {param: {"foo": "bar"}, "add_inputs": True})
- assert_raises_rpc_error(-3, "Invalid amount",
- node.fundrawtransaction, rawtx, {param: "", "add_inputs": True})
+ # Test fee rate values that don't pass fixed-point parsing checks.
+ for invalid_value in ["", 0.000000001, 1e-09, 1.111111111, 1111111111111111, "31.999999999999999999999"]:
+ assert_raises_rpc_error(-3, "Invalid amount", node.fundrawtransaction, rawtx, {param: invalid_value, "add_inputs": True})
self.log.info("Test min fee rate checks are bypassed with fundrawtxn, e.g. a fee_rate under 1 sat/vB is allowed")
node.fundrawtransaction(rawtx, {"fee_rate": 0.99999999, "add_inputs": True})