mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-12 00:26:03 +01:00
Merge bitcoin/bitcoin#33064: test: fix RPC coverage check
8aed477c33test: fix RPC coverage check (Brandon Odiwuor)2630b64f81test: add abortrescan RPC test (Brandon Odiwuor) Pull request description: This is #27593 cleaned up / rebased, now that the legacy wallet has been dropped. Closes #27593. ACKs for top commit: maflcko: lgtm ACK8aed477c33cedwies: ACK8aed477Tree-SHA512: 14a28b1ef0c1f63236d04c2ff6c11adddc40642e4a23d30398e8a03fc47f911465af91affc6e66ee2d548515ef4f65fb1cb5d69985c5a771a17b1c9c009f48ad
This commit is contained in:
@@ -16,6 +16,7 @@ class CreateCache(BitcoinTestFramework):
|
|||||||
|
|
||||||
def set_test_params(self):
|
def set_test_params(self):
|
||||||
self.num_nodes = 0
|
self.num_nodes = 0
|
||||||
|
self.uses_wallet = True
|
||||||
|
|
||||||
def setup_network(self):
|
def setup_network(self):
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -877,7 +877,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
|||||||
cache_node_dir,
|
cache_node_dir,
|
||||||
chain=self.chain,
|
chain=self.chain,
|
||||||
extra_conf=["bind=127.0.0.1"],
|
extra_conf=["bind=127.0.0.1"],
|
||||||
extra_args=['-disablewallet'],
|
extra_args=[],
|
||||||
rpchost=None,
|
rpchost=None,
|
||||||
timewait=self.rpc_timeout,
|
timewait=self.rpc_timeout,
|
||||||
timeout_factor=self.options.timeout_factor,
|
timeout_factor=self.options.timeout_factor,
|
||||||
|
|||||||
@@ -147,6 +147,10 @@ class TransactionTimeRescanTest(BitcoinTestFramework):
|
|||||||
)
|
)
|
||||||
assert_equal(all([r["success"] for r in import_res]), True)
|
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
|
# check user has 0 balance and no transactions
|
||||||
assert_equal(restorewo_wallet.getbalance(), 0)
|
assert_equal(restorewo_wallet.getbalance(), 0)
|
||||||
assert_equal(len(restorewo_wallet.listtransactions()), 0)
|
assert_equal(len(restorewo_wallet.listtransactions()), 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user