aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_psbt.py
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-12-02 13:55:26 +0100
committerJon Atack <jon@atack.com>2021-05-09 12:50:04 +0200
commit847288df07b45ca535c849e518b22818ab492896 (patch)
tree74a66d7c4ca910a1662e9afd087053707f57f0fb /test/functional/rpc_psbt.py
parent06a90fa0381c790f7bde2ab9bf47d2b22acef4a5 (diff)
downloadbitcoin-847288df07b45ca535c849e518b22818ab492896.tar.xz
test: fee rate values that cannot be represented as sat/vB
Diffstat (limited to 'test/functional/rpc_psbt.py')
-rwxr-xr-xtest/functional/rpc_psbt.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index bd382a09f3..c6e96e4a92 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -216,6 +216,10 @@ class PSBTTest(BitcoinTestFramework):
for invalid_value in ["", 0.000000001, 1e-09, 1.111111111, 1111111111111111, "31.999999999999999999999"]:
assert_raises_rpc_error(-3, "Invalid amount",
self.nodes[1].walletcreatefundedpsbt, inputs, outputs, 0, {param: invalid_value, "add_inputs": True})
+ # Test fee_rate values that cannot be represented in sat/vB.
+ for invalid_value in [0.0001, 0.00000001, 0.00099999, 31.99999999, "0.0001", "0.00000001", "0.00099999", "31.99999999"]:
+ assert_raises_rpc_error(-3, "Invalid amount",
+ self.nodes[1].walletcreatefundedpsbt, inputs, outputs, 0, {"fee_rate": invalid_value, "add_inputs": True})
self.log.info("- raises RPC error if both feeRate and fee_rate are passed")
assert_raises_rpc_error(-8, "Cannot specify both fee_rate (sat/vB) and feeRate (BTC/kvB)",