diff options
Diffstat (limited to 'test/functional/wallet_send.py')
-rwxr-xr-x | test/functional/wallet_send.py | 5 |
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) |