Add chain reader arg flags to trackerd

This commit is contained in:
nolash
2021-11-03 12:35:09 +01:00
parent 7217cb7f46
commit 14ddab1b34
5 changed files with 10 additions and 6 deletions

View File

@@ -17,4 +17,5 @@ class ArgumentParser(BaseArgumentParser):
self.add_argument('--offset', type=int, help='Start block height for initial history sync')
self.add_argument('--no-history', action='store_true', dest='no_history', help='Skip initial history sync')
if local_arg_flags & CICFlag.CHAIN:
self.add_argument('-r', '--registry-address', type=str, dest='registry_address', help='CIC registry contract address')
self.add_argument('--registry-address', type=str, dest='registry_address', help='CIC registry contract address')
self.add_argument('--trust-address', type=str, dest='trust_address', action='append', help='Add trust address')

View File

@@ -39,6 +39,9 @@ class Config(BaseConfig):
if local_arg_flags & CICFlag.CHAIN:
local_args_override['CIC_REGISTRY_ADDRESS'] = getattr(args, 'registry_address')
trust_addresses = getattr(args, 'trust_address', None)
if trust_addresses != None:
local_args_override['CIC_TRUST_ADDRESS'] = ','.join(trust_addresses)
if local_arg_flags & CICFlag.CELERY:
local_args_override['CELERY_QUEUE'] = getattr(args, 'celery_queue')