From 2630b64f8100b9a6652c99d5466b73a666d8cfca Mon Sep 17 00:00:00 2001 From: Brandon Odiwuor Date: Sat, 10 Feb 2024 11:26:34 +0300 Subject: [PATCH 1/2] test: add abortrescan RPC test --- test/functional/wallet_transactiontime_rescan.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/functional/wallet_transactiontime_rescan.py b/test/functional/wallet_transactiontime_rescan.py index 834e6d07686..3155a86b4f2 100755 --- a/test/functional/wallet_transactiontime_rescan.py +++ b/test/functional/wallet_transactiontime_rescan.py @@ -147,6 +147,10 @@ class TransactionTimeRescanTest(BitcoinTestFramework): ) assert_equal(all([r["success"] for r in import_res]), True) + self.log.info('Testing abortrescan when no rescan is in progress') + assert_equal(restorewo_wallet.getwalletinfo()['scanning'], False) + assert_equal(restorewo_wallet.abortrescan(), False) + # check user has 0 balance and no transactions assert_equal(restorewo_wallet.getbalance(), 0) assert_equal(len(restorewo_wallet.listtransactions()), 0) From 8aed477c3322212a636ab69d4923f89e2d9a63a2 Mon Sep 17 00:00:00 2001 From: Brandon Odiwuor Date: Mon, 5 Feb 2024 21:10:33 +0300 Subject: [PATCH 2/2] test: fix RPC coverage check --- test/functional/create_cache.py | 1 + test/functional/test_framework/test_framework.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/create_cache.py b/test/functional/create_cache.py index 0702ea76665..c77d5fee5ff 100755 --- a/test/functional/create_cache.py +++ b/test/functional/create_cache.py @@ -16,6 +16,7 @@ class CreateCache(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 0 + self.uses_wallet = True def setup_network(self): pass diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 7a0bb5118db..639421d3aea 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -877,7 +877,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): cache_node_dir, chain=self.chain, extra_conf=["bind=127.0.0.1"], - extra_args=['-disablewallet'], + extra_args=[], rpchost=None, timewait=self.rpc_timeout, timeout_factor=self.options.timeout_factor,