Merge branch 'master' into 13-appointment-signature

This commit is contained in:
Salvatore Ingala
2019-10-23 20:51:11 +08:00
12 changed files with 71 additions and 66 deletions

View File

@@ -29,18 +29,12 @@ if __name__ == '__main__':
# FIXME: Leaving this here for future option/arguments
pass
try:
if can_connect_to_bitcoind():
if in_correct_network(BTC_NETWORK):
# Fire the api
start_api()
if not can_connect_to_bitcoind():
logger.error("Can't connect to bitcoind. Shutting down")
else:
logger.error("bitcoind is running on a different network, check conf.py and bitcoin.conf."
"Shutting down")
elif not in_correct_network(BTC_NETWORK):
logger.error("bitcoind is running on a different network, check conf.py and bitcoin.conf. Shutting down")
else:
logger.error("Can't connect to bitcoind. Shutting down")
except Exception as e:
logger.error("There was an error while starting the daemon. Shutting down", error_args=e.args)
exit(1)
else:
# Fire the api
start_api()