mirror of
https://github.com/basicswap/basicswap.git
synced 2025-01-03 17:29:26 +00:00
Ignore the pivx pid file on windows.
This commit is contained in:
parent
f2b69e5498
commit
22e005728a
2 changed files with 14 additions and 10 deletions
|
@ -624,16 +624,20 @@ class BasicSwap(BaseApp):
|
||||||
datadir_pid = -1
|
datadir_pid = -1
|
||||||
for i in range(20):
|
for i in range(20):
|
||||||
try:
|
try:
|
||||||
# Workaround for mismatched pid file name in litecoin 0.21.2
|
if os.name == 'nt' and cc['core_version_group'] <= 17:
|
||||||
# Also set with pid= in .conf
|
# Older core versions don't write a pid file on windows
|
||||||
# TODO: Remove
|
pass
|
||||||
if cc['name'] == 'litecoin' and (not os.path.exists(pidfilepath)) and \
|
else:
|
||||||
os.path.exists(os.path.join(self.getChainDatadirPath(coin), 'bitcoind.pid')):
|
# Workaround for mismatched pid file name in litecoin 0.21.2
|
||||||
pidfilepath = os.path.join(self.getChainDatadirPath(coin), 'bitcoind.pid')
|
# Also set with pid= in .conf
|
||||||
|
# TODO: Remove
|
||||||
|
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')
|
||||||
|
|
||||||
with open(pidfilepath, 'rb') as fp:
|
with open(pidfilepath, 'rb') as fp:
|
||||||
datadir_pid = int(fp.read().decode('utf-8'))
|
datadir_pid = int(fp.read().decode('utf-8'))
|
||||||
assert (datadir_pid == cc['pid']), 'Mismatched pid'
|
assert (datadir_pid == cc['pid']), 'Mismatched pid'
|
||||||
assert (os.path.exists(authcookiepath))
|
assert (os.path.exists(authcookiepath))
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
@ -1547,7 +1547,7 @@ def main():
|
||||||
'use_csv': False,
|
'use_csv': False,
|
||||||
'blocks_confirmed': 1,
|
'blocks_confirmed': 1,
|
||||||
'conf_target': 2,
|
'conf_target': 2,
|
||||||
'core_version_group': 20,
|
'core_version_group': 17,
|
||||||
'chain_lookups': 'local',
|
'chain_lookups': 'local',
|
||||||
},
|
},
|
||||||
'dash': {
|
'dash': {
|
||||||
|
|
Loading…
Reference in a new issue