diff --git a/Tests/NetworkTests/BlockStreamingTest.swift b/Tests/NetworkTests/BlockStreamingTest.swift index 2730c22ed..761aa017e 100644 --- a/Tests/NetworkTests/BlockStreamingTest.swift +++ b/Tests/NetworkTests/BlockStreamingTest.swift @@ -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() diff --git a/Tests/NetworkTests/CompactBlockReorgTests.swift b/Tests/NetworkTests/CompactBlockReorgTests.swift index e65874baf..344c3e947 100644 --- a/Tests/NetworkTests/CompactBlockReorgTests.swift +++ b/Tests/NetworkTests/CompactBlockReorgTests.swift @@ -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) }