private void OnBlockAddedToMain(object sender, BlockReplacementEventArgs e)
        {
            _receiptStorage.EnsureCanonical(e.Block);

            // we don't want this to be on main processing thread
            Task.Run(() => TriggerReceiptInsertedEvent(e.Block, e.PreviousBlock));
        }
            public override async Task <BlockVisitOutcome> VisitBlock(Block block, CancellationToken cancellationToken)
            {
                BlockVisitOutcome outcome = await base.VisitBlock(block, cancellationToken);

                if (_blockTree.IsMainChain(block.Header))
                {
                    _receiptStorage.EnsureCanonical(block);
                }

                return(outcome);
            }