public async Task HandleNewIrreversibleBlockFoundAsync(NewIrreversibleBlockFoundEvent eventData)
        {
            var contractInfoCache = _smartContractExecutiveService.GetContractInfoCache();
            var addresses         = contractInfoCache.Where(c => c.Value <= eventData.BlockHeight).Select(c => c.Key).ToArray();
            var transactionIds    = _resourceCache.Where(c => c.Value.Address.IsIn(addresses) && c.Value.ResourceInfo.ParallelType != ParallelType.NonParallelizable).Select(c => c.Key);

            ClearResourceCache(transactionIds.Concat(_resourceCache
                                                     .Where(c => c.Value.RefBlockNumber <= eventData.BlockHeight)
                                                     .Select(c => c.Key)).Distinct());
            _smartContractExecutiveService.ClearContractInfoCache(eventData.BlockHeight);

            await Task.CompletedTask;
        }
        public async Task HandleNewIrreversibleBlockFoundAsync(NewIrreversibleBlockFoundEvent eventData)
        {
            var contractInfoCache = _smartContractExecutiveService.GetContractInfoCache();
            var addresses         = contractInfoCache.Where(c => c.Value <= eventData.BlockHeight).Select(c => c.Key).ToArray();

            try
            {
                var transactionIds = _resourceCache.Where(c =>
                                                          c.Value.Address.IsIn(addresses) &&
                                                          c.Value.ResourceInfo.ParallelType != ParallelType.NonParallelizable).Select(c => c.Key);

                ClearResourceCache(transactionIds.Concat(_resourceCache
                                                         .Where(c => c.Value.ResourceUsedBlockHeight <= eventData.BlockHeight)
                                                         .Select(c => c.Key)).Distinct().ToList());

                _smartContractExecutiveService.ClearContractInfoCache(eventData.BlockHeight);
            }
            catch (InvalidOperationException e)
            {
                Logger.LogError(e, "Unexpected case occured when clear resource info.");
            }

            await Task.CompletedTask;
        }