Skip to content

Commit f77d887

Browse files
committed
Wire CertificateStoreAdapter in dependencies
1 parent 4ef2ac1 commit f77d887

File tree

1 file changed

+2
-8
lines changed
  • mithril-aggregator/src/dependency_injection

1 file changed

+2
-8
lines changed

mithril-aggregator/src/dependency_injection/builder.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use warp::Filter;
3636

3737
use crate::{
3838
configuration::{ExecutionEnvironment, LIST_SNAPSHOTS_MAX_ITEMS},
39-
database::provider::{EpochSettingStore, StakePoolStore},
39+
database::provider::{CertificateStoreAdapter, EpochSettingStore, StakePoolStore},
4040
event_store::{EventMessage, EventStore, TransmitterService},
4141
http_server::routes::router,
4242
stake_distribution_service::{MithrilStakeDistributionService, StakeDistributionService},
@@ -377,13 +377,7 @@ impl DependenciesBuilder {
377377
let adapter: Box<dyn StoreAdapter<Key = String, Record = Certificate>> =
378378
match self.configuration.environment {
379379
ExecutionEnvironment::Production => {
380-
let adapter =
381-
SQLiteAdapter::new("certificate", self.get_sqlite_connection().await?)
382-
.map_err(|e| DependenciesBuilderError::Initialization {
383-
message: "Cannot create SQLite adapter for Certificate Store."
384-
.to_string(),
385-
error: Some(e.into()),
386-
})?;
380+
let adapter = CertificateStoreAdapter::new(self.get_sqlite_connection().await?);
387381

388382
Box::new(adapter)
389383
}

0 commit comments

Comments
 (0)