Пример #1
0
        private void OnTxesConfirmed(object sender, TxesConfirmedEventArgs e)
        {
            var confirmTime = e.ConfirmBlock.DateSeen;

            // collect the stats on the confirmed txes
            var confirmedTxes = e.ConfirmedTxes.Values
                                .Where(confirmedTx => confirmTime >= confirmedTx.DateSeen)
                                .Select(
                confirmedTx => new ConfirmedTxStats(confirmedTx.Hash, confirmTime - confirmedTx.DateSeen, confirmedTx.Fee, confirmedTx.TxByteSize))
                                .ToList();

            // keep track of the stats for logging
            lock (confirmedBlockStatsByHeight)
                confirmedBlockStatsByHeight[e.ConfirmBlock.Height] = new ConfirmedBlockStats(e.ConfirmBlock, confirmedTxes, confirmTime);

            NotifyWork();
        }
Пример #2
0
        private void OnTxesConfirmed(object sender, TxesConfirmedEventArgs e)
        {
            var confirmTime = e.ConfirmBlock.DateSeen;

            // collect the stats on the confirmed txes
            var confirmedTxes = e.ConfirmedTxes.Values
                .Where(confirmedTx => confirmTime >= confirmedTx.DateSeen)
                .Select(
                    confirmedTx => new ConfirmedTxStats(confirmedTx.Hash, confirmTime - confirmedTx.DateSeen, confirmedTx.Fee, confirmedTx.TxByteSize))
                .ToList();

            // keep track of the stats for logging
            lock (confirmedBlockStatsByHeight)
                confirmedBlockStatsByHeight[e.ConfirmBlock.Height] = new ConfirmedBlockStats(e.ConfirmBlock, confirmedTxes, confirmTime);

            NotifyWork();
        }