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);
}
Aggregations