Ejemplo n.º 1
0
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...")
Ejemplo n.º 2
0
 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)