public async Task ProcessAsync(Block block, TransactionResult transactionResult, LogEvent logEvent)
        {
            if (CrossChainConfigOptions.CurrentValue.CrossChainDataValidationIgnored)
            {
                Logger.LogTrace("Cross chain data validation disabled.");
                return;
            }

            var crossChainIndexingDataProposedEvent = new CrossChainIndexingDataProposedEvent();

            crossChainIndexingDataProposedEvent.MergeFrom(logEvent);
            var crossChainBlockData = crossChainIndexingDataProposedEvent.ProposedCrossChainData;

            if (crossChainBlockData.IsNullOrEmpty())
            {
                return;
            }
            var validationResult =
                await _crossChainIndexingDataValidationService.ValidateCrossChainIndexingDataAsync(crossChainBlockData,
                                                                                                   block.GetHash(), block.Height);

            if (validationResult)
            {
                Logger.LogDebug(
                    $"Valid cross chain indexing proposal found, block height {block.Height}, block hash {block.GetHash()} ");
                var proposalId = ProposalCreated.Parser
                                 .ParseFrom(transactionResult.Logs.First(l => l.Name == nameof(ProposalCreated)).NonIndexed)
                                 .ProposalId;
                _proposalService.AddNotApprovedProposal(proposalId, block.Height);
            }
        }
        public async Task Validate_WithoutEmptyInput_Test()
        {
            int chainId        = _chainOptions.ChainId;
            var blockInfoCache = new List <IBlockCacheEntity>();

            for (int i = 0; i <= CrossChainConstants.DefaultBlockCacheEntityCount; i++)
            {
                blockInfoCache.Add(new SideChainBlockData
                {
                    Height  = 1 + i,
                    ChainId = chainId
                });
            }

            _crossChainTestHelper.AddFakeSideChainIdHeight(chainId, 0);
            var fakeCache = new Dictionary <int, List <IBlockCacheEntity> > {
                { chainId, blockInfoCache }
            };

            AddFakeCacheData(fakeCache);

            var crossChainBlockData = new CrossChainBlockData();
            var res = await _crossChainIndexingDataValidationService.ValidateCrossChainIndexingDataAsync(crossChainBlockData,
                                                                                                         Hash.Empty, 1);

            Assert.True(res);
        }