@@ -51,6 +51,8 @@ use crate::{
51
51
52
52
use super :: { DependenciesBuilderError , Result } ;
53
53
54
+ const SQLITE_FILE : & str = "aggregator.sqlite3" ;
55
+
54
56
/// Dependencies container builder
55
57
pub struct DependenciesBuilder {
56
58
/// Configuration parameters
@@ -184,7 +186,7 @@ impl DependenciesBuilder {
184
186
async fn build_sqlite_connection ( & self ) -> Result < Arc < Mutex < Connection > > > {
185
187
let connection = match self . configuration . environment {
186
188
ExecutionEnvironment :: Production => {
187
- Connection :: open ( self . configuration . get_sqlite_file ( ) )
189
+ Connection :: open ( self . configuration . get_sqlite_dir ( ) . join ( SQLITE_FILE ) )
188
190
}
189
191
_ => Connection :: open ( ":memory:" ) ,
190
192
} ;
@@ -414,7 +416,7 @@ impl DependenciesBuilder {
414
416
match self . configuration . environment {
415
417
ExecutionEnvironment :: Production => {
416
418
let adapter =
417
- SQLiteAdapter :: new ( "certificate " , self . get_sqlite_connection ( ) . await ?)
419
+ SQLiteAdapter :: new ( "verification_key " , self . get_sqlite_connection ( ) . await ?)
418
420
. map_err ( |e| DependenciesBuilderError :: Initialization {
419
421
message : "Cannot create SQLite adapter for VerificationKeyStore."
420
422
. to_string ( ) ,
@@ -977,6 +979,7 @@ impl DependenciesBuilder {
977
979
978
980
Ok ( dependency_manager)
979
981
}
982
+
980
983
/// Create dependencies for the [EventStore] task.
981
984
pub async fn create_event_store ( & mut self ) -> Result < EventStore > {
982
985
let event_store = EventStore :: new ( self . get_event_transmitter_receiver ( ) . await ?) ;
@@ -998,7 +1001,7 @@ impl DependenciesBuilder {
998
1001
error : Some ( e. into ( ) ) ,
999
1002
} ) ?
1000
1003
. ok_or ( DependenciesBuilderError :: Initialization {
1001
- message : "cannot build aggrgator runner: impossible to retrieve current epoch"
1004
+ message : "cannot build aggregator runner: impossible to retrieve current epoch"
1002
1005
. to_string ( ) ,
1003
1006
error : None ,
1004
1007
} ) ?;
0 commit comments