preparescript: Support production docker config.

This commit is contained in:
tecnovert
2021-06-28 23:56:45 +02:00
parent 398ef268a6
commit 2be16465fb
14 changed files with 206 additions and 58 deletions

View File

@@ -729,13 +729,17 @@ class BasicSwap(BaseApp):
if c == Coins.PART:
self.coin_clients[c]['have_spent_index'] = ci.haveSpentIndex()
# Sanity checks
rv = self.callcoinrpc(c, 'extkey')
if 'result' in rv and 'No keys to list.' in rv['result']:
raise ValueError('No keys loaded.')
try:
# Sanity checks
rv = self.callcoinrpc(c, 'extkey')
if 'result' in rv and 'No keys to list.' in rv['result']:
raise ValueError('No keys loaded.')
if self.callcoinrpc(c, 'getstakinginfo')['enabled'] is not False:
self.log.warning('%s staking is not disabled.', ci.coin_name())
except Exception as e:
self.log.error('Sanity checks failed: %s', str(e))
if self.callcoinrpc(c, 'getstakinginfo')['enabled'] is not False:
self.log.warning('%s staking is not disabled.', ci.coin_name())
elif c == Coins.XMR:
ci.ensureWalletExists()