cuprate_txpool/
tx.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Transaction metadata.

/// Data about a transaction in the pool.
///
/// Used in [`TxpoolReadResponse::Backlog`](crate::service::interface::TxpoolReadResponse::Backlog).
#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq, Hash)]
pub struct TxEntry {
    /// The transaction's ID (hash).
    pub id: [u8; 32],
    /// The transaction's weight.
    pub weight: u64,
    /// The transaction's fee.
    pub fee: u64,
    /// How long the transaction has been in the pool.
    pub time_in_pool: std::time::Duration,
}