Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Dec 18, 2024
1 parent 504373d commit acd172c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Blockchain/Tests/BlockchainTests/BlockchainServices.swift
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion Blockchain/Tests/BlockchainTests/ValidatorServiceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit acd172c

Please sign in to comment.