async def _main( logger: logging.Logger, config: Config, arguments: argparse.Namespace ) -> None: key_store = KeyStore.from_config(config) clock = Clock.from_config(config) beacon_node = BeaconNode.from_config(config) # with key_store.persistence(): async with beacon_node: client = Client(key_store, clock, beacon_node) async with background_trio_service(client): await _wait_for_interrupts() logger.info("received interrupt; shutting down...")
def from_config(cls, config: Config) -> "Client": clock = Clock.from_config(config) beacon_node = BeaconNode.from_config(config) return cls(config.key_store, clock, beacon_node)