diff --git a/Blockchain/Tests/BlockchainTests/BlockchainServices.swift b/Blockchain/Tests/BlockchainTests/BlockchainServices.swift index d7985125..ae08472e 100644 --- a/Blockchain/Tests/BlockchainTests/BlockchainServices.swift +++ b/Blockchain/Tests/BlockchainTests/BlockchainServices.swift @@ -1,10 +1,12 @@ import Blockchain +import Foundation import Utils class BlockchainServices { let config: ProtocolConfigRef let timeProvider: MockTimeProvider let dataProvider: BlockchainDataProvider + let dataStore: DataStore let eventBus: EventBus let scheduler: MockScheduler let keystore: DevKeyStore @@ -30,6 +32,7 @@ class BlockchainServices { self.genesisBlock = genesisBlock self.genesisState = genesisState dataProvider = try! await BlockchainDataProvider(InMemoryDataProvider(genesisState: genesisState, genesisBlock: genesisBlock)) + dataStore = DataStore(InMemoryDataStore(), basePath: URL(fileURLWithPath: "/tmp/boka-test-data")) storeMiddleware = StoreMiddleware() eventBus = EventBus(eventMiddleware: .serial(Middleware(storeMiddleware), .noError), handlerMiddleware: .noError) diff --git a/Blockchain/Tests/BlockchainTests/ValidatorServiceTests.swift b/Blockchain/Tests/BlockchainTests/ValidatorServiceTests.swift index 8493157d..d927f77d 100644 --- a/Blockchain/Tests/BlockchainTests/ValidatorServiceTests.swift +++ b/Blockchain/Tests/BlockchainTests/ValidatorServiceTests.swift @@ -23,7 +23,8 @@ struct ValidatorServiceTests { keystore: services.keystore, eventBus: services.eventBus, scheduler: services.scheduler, - dataProvider: services.dataProvider + dataProvider: services.dataProvider, + dataStore: services.dataStore ) await validatorService.onSyncCompleted() return (services, validatorService)