pub struct TransactionPoolEntry {
pub transaction: Transaction,
pub received_at: Timestamp,
pub priority: u64,
pub propagation_count: u32,
}Expand description
Transaction pool entry with additional metadata
Fields§
§transaction: TransactionThe transaction
received_at: TimestampWhen it was received
priority: u64Priority score for ordering
propagation_count: u32Number of times it was propagated
Implementations§
Source§impl TransactionPoolEntry
impl TransactionPoolEntry
Sourcepub fn new(transaction: Transaction, received_at: Timestamp) -> Self
pub fn new(transaction: Transaction, received_at: Timestamp) -> Self
Create a new pool entry
Sourcepub fn update_priority(&mut self, current_time: Timestamp)
pub fn update_priority(&mut self, current_time: Timestamp)
Update priority based on current conditions
Sourcepub fn is_expired(&self, current_time: Timestamp, max_lifetime: u64) -> bool
pub fn is_expired(&self, current_time: Timestamp, max_lifetime: u64) -> bool
Check if transaction has expired
Trait Implementations§
Source§impl Clone for TransactionPoolEntry
impl Clone for TransactionPoolEntry
Source§fn clone(&self) -> TransactionPoolEntry
fn clone(&self) -> TransactionPoolEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransactionPoolEntry
impl Debug for TransactionPoolEntry
impl Eq for TransactionPoolEntry
Source§impl PartialEq for TransactionPoolEntry
impl PartialEq for TransactionPoolEntry
Source§fn eq(&self, other: &TransactionPoolEntry) -> bool
fn eq(&self, other: &TransactionPoolEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TransactionPoolEntry
Auto Trait Implementations§
impl Freeze for TransactionPoolEntry
impl RefUnwindSafe for TransactionPoolEntry
impl Send for TransactionPoolEntry
impl Sync for TransactionPoolEntry
impl Unpin for TransactionPoolEntry
impl UnsafeUnpin for TransactionPoolEntry
impl UnwindSafe for TransactionPoolEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more