cuprate_txpool/tx.rs
1//! Transaction metadata.
2
3/// Data about a transaction in the pool.
4///
5/// Used in [`TxpoolReadResponse::Backlog`](crate::service::interface::TxpoolReadResponse::Backlog).
6#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq, Hash)]
7pub struct TxEntry {
8 /// The transaction's ID (hash).
9 pub id: [u8; 32],
10 /// The transaction's weight.
11 pub weight: usize,
12 /// The transaction's fee.
13 pub fee: u64,
14 /// If the tx is in the private pool.
15 pub private: bool,
16 /// The UNIX timestamp when the transaction was received.
17 pub received_at: u64,
18}