Search in sources :

Example 1 with HistoricalBlockSyncService

use of tech.pegasys.teku.beacon.sync.historical.HistoricalBlockSyncService in project teku by ConsenSys.

the class SyncServiceFactory method create.

private SyncService create() {
    if (!syncConfig.isSyncEnabled()) {
        return new NoopSyncService();
    }
    final ForwardSyncService forwardSyncService = createForwardSyncService();
    final FetchRecentBlocksService recentBlockFetcher = FetchRecentBlocksService.create(asyncRunner, p2pNetwork, pendingBlocks, forwardSyncService);
    final SyncStateTracker syncStateTracker = createSyncStateTracker(forwardSyncService);
    final HistoricalBlockSyncService historicalBlockSyncService = createHistoricalSyncService(syncStateTracker);
    return new DefaultSyncService(forwardSyncService, recentBlockFetcher, syncStateTracker, historicalBlockSyncService);
}
Also used : FetchRecentBlocksService(tech.pegasys.teku.beacon.sync.gossip.FetchRecentBlocksService) HistoricalBlockSyncService(tech.pegasys.teku.beacon.sync.historical.HistoricalBlockSyncService) SyncStateTracker(tech.pegasys.teku.beacon.sync.events.SyncStateTracker) ForwardSyncService(tech.pegasys.teku.beacon.sync.forward.ForwardSyncService)

Aggregations

SyncStateTracker (tech.pegasys.teku.beacon.sync.events.SyncStateTracker)1 ForwardSyncService (tech.pegasys.teku.beacon.sync.forward.ForwardSyncService)1 FetchRecentBlocksService (tech.pegasys.teku.beacon.sync.gossip.FetchRecentBlocksService)1 HistoricalBlockSyncService (tech.pegasys.teku.beacon.sync.historical.HistoricalBlockSyncService)1