tests: Start wallet restore test.

Fix LTC pidfile in config.
Update LTC onion port for core version 21.
This commit is contained in:
tecnovert
2022-07-15 16:38:05 +02:00
parent a2830afc06
commit ede01d3fc8
9 changed files with 232 additions and 78 deletions

View File

@@ -507,8 +507,9 @@ class BasicSwap(BaseApp):
for i in range(20):
try:
# Workaround for mismatched pid file name in litecoin 0.21.2
# Also set with pid= in .conf
# TODO: Remove
if cc['name'] == 'litecoin' and not os.path.exists(pidfilepath) and \
if cc['name'] == 'litecoin' and (not os.path.exists(pidfilepath)) and \
os.path.exists(os.path.join(self.getChainDatadirPath(coin), 'bitcoind.pid')):
pidfilepath = os.path.join(self.getChainDatadirPath(coin), 'bitcoind.pid')
@@ -517,7 +518,7 @@ class BasicSwap(BaseApp):
assert(datadir_pid == cc['pid']), 'Mismatched pid'
assert(os.path.exists(authcookiepath))
except Exception:
time.sleep(0.5)
self.delay_event.wait(0.5)
try:
if os.name != 'nt' or cc['core_version_group'] > 17: # Litecoin on windows doesn't write a pid file
assert(datadir_pid == cc['pid']), 'Mismatched pid'