예제 #1
0
    async def sync(self, args: Namespace, logger: logging.Logger,
                   chain: AsyncChainAPI, base_db: AtomicDatabaseAPI,
                   peer_pool: BasePeerPool, event_bus: EndpointAPI) -> None:

        syncer = FullChainSyncer(
            chain,
            AsyncChainDB(base_db),
            base_db,
            cast(ETHPeerPool, peer_pool),
        )

        await syncer.run()
예제 #2
0
    async def sync(self, logger: Logger, chain: BaseChain,
                   db_manager: BaseManager, peer_pool: BaseChainPeerPool,
                   cancel_token: CancelToken) -> None:

        syncer = FullChainSyncer(
            chain,
            db_manager.get_chaindb(),  # type: ignore
            db_manager.get_db(),  # type: ignore
            cast(ETHPeerPool, peer_pool),
            cancel_token,
        )

        await syncer.run()