diff options
author | brunoerg <brunoely.gc@gmail.com> | 2022-08-22 16:27:03 -0300 |
---|---|---|
committer | brunoerg <brunoely.gc@gmail.com> | 2022-08-23 17:13:52 -0300 |
commit | d1a00046214c02684438adcfcd23eea39b86bc7f (patch) | |
tree | da0f43483969dac02bfae46908de0a0e34d0267b /test/functional/wallet_transactiontime_rescan.py | |
parent | c336f813b3cd1d222d4b37cce3a6fbd855c5f4ad (diff) |
test: add coverage for invalid parameters for `rescanblockchain`
Diffstat (limited to 'test/functional/wallet_transactiontime_rescan.py')
-rwxr-xr-x | test/functional/wallet_transactiontime_rescan.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/wallet_transactiontime_rescan.py b/test/functional/wallet_transactiontime_rescan.py index 21941084a3..9caa1fa3d0 100755 --- a/test/functional/wallet_transactiontime_rescan.py +++ b/test/functional/wallet_transactiontime_rescan.py @@ -11,6 +11,7 @@ from test_framework.blocktools import COINBASE_MATURITY from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, + assert_raises_rpc_error, set_node_times, ) @@ -158,5 +159,11 @@ class TransactionTimeRescanTest(BitcoinTestFramework): assert_equal(tx['time'], cur_time + ten_days + ten_days + ten_days) + self.log.info('Test handling of invalid parameters for rescanblockchain') + assert_raises_rpc_error(-8, "Invalid start_height", restorewo_wallet.rescanblockchain, -1, 10) + assert_raises_rpc_error(-8, "Invalid stop_height", restorewo_wallet.rescanblockchain, 1, -1) + assert_raises_rpc_error(-8, "stop_height must be greater than start_height", restorewo_wallet.rescanblockchain, 20, 10) + + if __name__ == '__main__': TransactionTimeRescanTest().main() |