public void RequestCrossChainIndexing() { //Logger.LogTrace("Request cross chain indexing .."); var chainIds = _crossChainMemoryCacheService.GetCachedChainIds(); foreach (var chainId in chainIds) { if (!_grpcCrossChainClients.TryGetValue(chainId, out var client)) { continue; } Logger.LogTrace($"Request chain {ChainHelpers.ConvertChainIdToBase58(chainId)}"); var targetHeight = _crossChainMemoryCacheService.GetNeededChainHeightForCache(chainId); var task = TryRequest(client, c => c.StartIndexingRequest(chainId, targetHeight, _crossChainDataProducer)); } }
public void GetChainHeightNeeded_NotExistChain() { int chainId = 123; Assert.Throws <ChainCacheNotFoundException>(() => _crossChainMemoryCacheService.GetNeededChainHeightForCache(chainId)); }