Skip to content

Commit 67f4266

Browse files
committed
Wire SignedEntityStore in dependencies
1 parent 84e1d50 commit 67f4266

File tree

1 file changed

+3
-6
lines changed
  • mithril-aggregator/src/dependency_injection

1 file changed

+3
-6
lines changed

mithril-aggregator/src/dependency_injection/builder.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ use warp::Filter;
3737
use crate::{
3838
configuration::{ExecutionEnvironment, LIST_SNAPSHOTS_MAX_ITEMS},
3939
database::provider::{
40-
CertificateStoreAdapter, EpochSettingStore, SignerRegistrationStoreAdapter, StakePoolStore,
40+
CertificateStoreAdapter, EpochSettingStore, SignedEntityStoreAdapter,
41+
SignerRegistrationStoreAdapter, StakePoolStore,
4142
},
4243
event_store::{EventMessage, EventStore, TransmitterService},
4344
http_server::routes::router,
@@ -256,11 +257,7 @@ impl DependenciesBuilder {
256257
dyn StoreAdapter<Key = String, Record = mithril_common::entities::Snapshot>,
257258
> = match self.configuration.environment {
258259
ExecutionEnvironment::Production => {
259-
let adapter = SQLiteAdapter::new("snapshot", self.get_sqlite_connection().await?)
260-
.map_err(|e| DependenciesBuilderError::Initialization {
261-
message: "Cannot create SQLite adapter for Snapshot Store.".to_string(),
262-
error: Some(e.into()),
263-
})?;
260+
let adapter = SignedEntityStoreAdapter::new(self.get_sqlite_connection().await?);
264261

265262
Box::new(adapter)
266263
}

0 commit comments

Comments
 (0)