test: Add functional test for continuing a reindex

Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
This commit is contained in:
TheCharlatan
2024-05-23 14:11:39 +02:00
parent 201c1a9282
commit 1b1c6dcca0
2 changed files with 22 additions and 2 deletions

View File

@@ -241,7 +241,7 @@ class TestNode():
if self.start_perf:
self._start_perf()
def wait_for_rpc_connection(self):
def wait_for_rpc_connection(self, *, wait_for_import=True):
"""Sets up an RPC connection to the bitcoind process. Returns False if unable to connect."""
# Poll at a rate of four times per second
poll_per_s = 4
@@ -263,7 +263,7 @@ class TestNode():
)
rpc.getblockcount()
# If the call to getblockcount() succeeds then the RPC connection is up
if self.version_is_at_least(190000):
if self.version_is_at_least(190000) and wait_for_import:
# getmempoolinfo.loaded is available since commit
# bb8ae2c (version 0.19.0)
self.wait_until(lambda: rpc.getmempoolinfo()['loaded'])