aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_send.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/wallet_send.py
parentea6f76b66ecc52360719053489e0ec9f9a673eab (diff)
downloadbitcoin-c5fd4344f7fcc257062a610c8ff26ffcc9b53953.tar.xz
test: explicit fee rates with invalid amounts
Diffstat (limited to 'test/functional/wallet_send.py')
-rwxr-xr-xtest/functional/wallet_send.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/wallet_send.py b/test/functional/wallet_send.py
index ac64f44f1f..4b3aac3158 100755
--- a/test/functional/wallet_send.py
+++ b/test/functional/wallet_send.py
@@ -360,6 +360,11 @@ class WalletSendTest(BitcoinTestFramework):
for zero_value in [0, 0.000, 0.00000000, "0", "0.000", "0.00000000"]:
self.test_send(from_wallet=w0, to_wallet=w1, amount=1, fee_rate=zero_value, expect_error=(-4, msg))
self.test_send(from_wallet=w0, to_wallet=w1, amount=1, arg_fee_rate=zero_value, expect_error=(-4, msg))
+ msg = "Invalid amount"
+ # 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"]:
+ self.test_send(from_wallet=w0, to_wallet=w1, amount=1, fee_rate=invalid_value, expect_error=(-3, msg))
+ self.test_send(from_wallet=w0, to_wallet=w1, amount=1, arg_fee_rate=invalid_value, expect_error=(-3, msg))
# TODO: Return hex if fee rate is below -maxmempool
# res = self.test_send(from_wallet=w0, to_wallet=w1, amount=1, conf_target=0.1, estimate_mode="sat/b", add_to_wallet=False)