use of tech.pegasys.teku.storage.api.StubFinalizedCheckpointChannel in project teku by ConsenSys.
the class StorageSystem method create.
static StorageSystem create(final Database database, final RestartedStorageSupplier restartedSupplier, final StateStorageMode storageMode, final StoreConfig storeConfig, final Spec spec, final ChainBuilder chainBuilder) {
final StubMetricsSystem metricsSystem = new StubMetricsSystem();
// Create and start storage server
final ChainStorage chainStorageServer = ChainStorage.create(database, spec);
// Create recent chain data
final FinalizedCheckpointChannel finalizedCheckpointChannel = new StubFinalizedCheckpointChannel();
final TrackingChainHeadChannel chainHeadChannel = new TrackingChainHeadChannel();
final RecentChainData recentChainData = StorageBackedRecentChainData.createImmediately(SYNC_RUNNER, metricsSystem, storeConfig, chainStorageServer, chainStorageServer, chainStorageServer, finalizedCheckpointChannel, chainHeadChannel, spec);
// Create combined client
final CombinedChainDataClient combinedChainDataClient = new CombinedChainDataClient(recentChainData, chainStorageServer, spec);
// Return storage system
return new StorageSystem(metricsSystem, chainHeadChannel, storageMode, chainStorageServer, database, recentChainData, combinedChainDataClient, restartedSupplier, chainBuilder, spec);
}
Aggregations