Apply requested changes

- Adds a PRG based on a hardcoded seed to make the tests reproducible (get_random_value_hex)
- Updates all the tests replacing urandom for get_random_value_hex
- Properly places misplaced bitcoin_cli in bitcoin_sim_tests
- Typos
This commit is contained in:
Sergi Delgado Segura
2019-10-23 12:40:25 +01:00
parent af0e9c81b5
commit 52f52f57f8
12 changed files with 71 additions and 60 deletions

View File

@@ -29,13 +29,13 @@ if __name__ == '__main__':
# FIXME: Leaving this here for future option/arguments
pass
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")
# Fire the api
start_api()