Пример #1
0
 /// <summary>
 /// Creates a persistence entry from a memory pool transaction entry.
 /// </summary>
 /// <param name="tx">Memory pool transaction entry.</param>
 /// <returns>Persistence entry.</returns>
 public static MempoolPersistenceEntry FromTxMempoolEntry(TxMempoolEntry tx)
 {
     return(new MempoolPersistenceEntry
     {
         Tx = tx.Transaction,
         Time = tx.Time,
         FeeDelta = tx.feeDelta
     });
 }
Пример #2
0
        /// <summary>
        /// Gets transaction information for a specific transaction.
        /// </summary>
        /// <param name="hash">Hash of the transaction to query.</param>
        /// <returns>Transaction information.</returns>
        public TxMempoolInfo Info(uint256 hash)
        {
            TxMempoolEntry item     = this.memPool.MapTx.TryGet(hash);
            var            infoItem = item == null ? null : new TxMempoolInfo
            {
                Trx      = item.Transaction,
                Time     = item.Time,
                FeeRate  = new FeeRate(item.Fee, (int)item.GetTxSize()),
                FeeDelta = item.ModifiedFee - item.Fee
            };

            return(infoItem);
        }
Пример #3
0
 /// <summary>
 /// Copy constructor for a transaction memory pool entry.
 /// </summary>
 /// <param name="other">Entry to copy.</param>
 /// <exception cref="NotImplementedException"/>
 public TxMempoolEntry(TxMempoolEntry other)
 {
     throw new NotImplementedException();
 }