private static Task GetPrefetchingTask(CacheCoinView cache, ILookaheadBlockPuller lookaheadPuller, ConsensusFlags flags)
        {
            Task prefetching = Task.FromResult <bool>(true);

            if (cache != null && lookaheadPuller != null)
            {
                var nextBlock = lookaheadPuller.TryGetLookahead(0);
                if (nextBlock != null)
                {
                    prefetching = Task.Run(() => cache.FetchCoins(GetIdsToFetch(nextBlock, flags.EnforceBIP30)));
                }
            }
            return(prefetching);
        }