diff options
author | Jon Atack <jon@atack.com> | 2020-12-03 10:55:15 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2021-05-09 12:49:47 +0200 |
commit | c5fd4344f7fcc257062a610c8ff26ffcc9b53953 (patch) | |
tree | 1c764d5f3df844da1dcc162102213ce7feb9d532 /test/functional/rpc_fundrawtransaction.py | |
parent | ea6f76b66ecc52360719053489e0ec9f9a673eab (diff) | |
download | bitcoin-c5fd4344f7fcc257062a610c8ff26ffcc9b53953.tar.xz |
test: explicit fee rates with invalid amounts
Diffstat (limited to 'test/functional/rpc_fundrawtransaction.py')
-rwxr-xr-x | test/functional/rpc_fundrawtransaction.py | 5 |
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}) |