Merge pull request #1253 from LukasKorba/1252-NetworkTests-fails-to-run

[#1252] NetworkTests fails to run
This commit is contained in:
Lukas Korba 2023-09-11 09:30:19 +02:00 committed by GitHub
commit 65d0e987f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 15 deletions

View File

@ -134,13 +134,9 @@ class BlockStreamingTest: ZcashTestCase {
let action = DownloadAction(container: mockContainer, configProvider: CompactBlockProcessor.ConfigProvider(config: processorConfig))
let blockDownloader = mockContainer.resolve(BlockDownloader.self)
let syncControlData = SyncControlData(
latestBlockHeight: latestBlockHeight,
latestScannedHeight: startHeight,
firstUnenhancedHeight: nil
)
let context = ActionContextMock()
await context.update(syncControlData: syncControlData)
context.updateStateClosure = { _ in }
let expectation = XCTestExpectation()
@ -175,7 +171,9 @@ class BlockStreamingTest: ZcashTestCase {
firstUnenhancedHeight: nil
)
let context = ActionContextMock()
await context.update(syncControlData: syncControlData)
context.updateStateClosure = { _ in }
context.underlyingSyncControlData = syncControlData
context.lastScannedHeight = startHeight
let date = Date()

View File

@ -94,14 +94,6 @@ class CompactBlockReorgTests: ZcashTestCase {
mockValidateCombinedChainFailureError: .rustValidateCombinedChainInvalidChain(Int32(network.constants.saplingActivationHeight + 320))
)
let transactionRepository = MockTransactionRepository(
unminedCount: 0,
receivedCount: 0,
sentCount: 0,
scannedHeight: 0,
network: network
)
Dependencies.setup(
in: mockContainer,
urls: Initializer.URLs(
@ -117,6 +109,9 @@ class CompactBlockReorgTests: ZcashTestCase {
loggingPolicy: .default(.debug)
)
await self.rustBackendMockHelper.rustBackendMock.setPutSaplingSubtreeRootsStartIndexRootsClosure { _, _ in }
await self.rustBackendMockHelper.rustBackendMock.setUpdateChainTipHeightClosure { _ in }
mockContainer.mock(type: LatestBlocksDataProvider.self, isSingleton: true) { [self] _ in
LatestBlocksDataProviderImpl(service: service, rustBackend: self.rustBackend)
}