don't netcheck if tor disabled

master
Kevin Froman 2020-10-22 12:45:19 +00:00
parent 5dddeb3f10
commit 8a4c138eed
2 changed files with 8 additions and 5 deletions

View File

@ -56,7 +56,7 @@ def show_info(p: Process):
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument( parser.add_argument(
"--use-bootstap-file", help="Use bootstrap node list file", "--use-bootstrap-file", help="Use bootstrap node list file",
type=int, default=1) type=int, default=1)
parser.add_argument( parser.add_argument(
"--show-stats", help="Display curses output of Onionr stats", "--show-stats", help="Display curses output of Onionr stats",
@ -128,6 +128,7 @@ config['general']['dev_mode'] = False
config['general']['store_plaintext_blocks'] = True config['general']['store_plaintext_blocks'] = True
config['general']['use_bootstrap_list'] = True config['general']['use_bootstrap_list'] = True
config['transports']['tor'] = True
if not args.use_bootstrap_file: if not args.use_bootstrap_file:
config['general']['use_bootstrap_list'] = False config['general']['use_bootstrap_list'] = False

View File

@ -149,9 +149,11 @@ class OnionrCommunicatorDaemon:
180, my_args=[self], requires_peer=True, max_threads=1) 180, my_args=[self], requires_peer=True, max_threads=1)
deniableBlockTimer.count = (deniableBlockTimer.frequency - 175) deniableBlockTimer.count = (deniableBlockTimer.frequency - 175)
if config.get('transports.tor', True):
# Timer to check for connectivity, # Timer to check for connectivity,
# through Tor to various high-profile onion services # through Tor to various high-profile onion services
OnionrCommunicatorTimers(self, netcheck.net_check, 500, OnionrCommunicatorTimers(
self, netcheck.net_check, 500,
my_args=[self], max_threads=1) my_args=[self], max_threads=1)
# Announce the public API server transport address # Announce the public API server transport address