def __init__(self, phase_config, service_config): self.phase_config = phase_config self.service_config = service_config self._scheduler = BackgroundScheduler() self._config_handlers = { PHASE: self._phase_type_config_handler, 'cron': self._cron_type_config_handler, 'observer': self._observer_type_config_handler } self._registrations = {} self._configured_phases = [] self._register_configs() phase = self.phase_config[0][PHASE] self.network = network.ConnectionManager(self.service_config['host'], self.service_config['port'], 0b00001 << phase - 1, self)
def __init__(self, phase_config, service_config): self.phase_config = phase_config self.service_config = service_config self._scheduler = BackgroundScheduler() self._config_handlers = { PHASE: self._phase_type_config_handler, 'cron': self._cron_type_config_handler, 'observer': self._observer_type_config_handler } self._registrations = {} self._configured_phases = [] self._register_configs() # dictionary of public transmission flags. set by network, obtained through yml config file. self.public_transmission = None phase = self.phase_config[0][PHASE] self.network = network.ConnectionManager(self.service_config['host'], self.service_config['port'], 0b00001 << phase - 1, self)
def __init__(self, phase_config, service_config): self.phase_config = phase_config self.service_config = service_config self._scheduler = BackgroundScheduler() self._config_handlers = { PHASE: self._phase_type_config_handler, 'cron': self._cron_type_config_handler, 'observer': self._observer_type_config_handler } self._registrations = {} self._configured_phases = [] self._register_configs() # public transmission flags self.public_transmission = None # this nodes phases provided phase = self.phase_config[0][PHASE] # this nodes network self.network = network.ConnectionManager(self.service_config['host'], self.service_config['port'], 0b00001 << phase - 1, self) # smart contract handler used for running reserved and non-reserved smart contracts self.sch = smart_contracts.SmartContractsHandler(self.network, self.service_config['public_key'])