pub struct MempoolEntry {
pub tx: Arc<Transaction>,
pub vsize: u32,
pub fee: u64,
pub fee_rate: u64,
pub ancestor_size: u64,
pub ancestor_fee: u64,
pub descendant_size: u64,
pub descendant_fee: u64,
pub time: u64,
pub height: u32,
}Expand description
Transaction plus policy accounting used by mempool ordering and limits.
Fields§
§tx: Arc<Transaction>Transaction payload shared with downstream consumers.
vsize: u32Virtual transaction size in vbytes.
fee: u64Transaction fee in satoshis.
fee_rate: u64Fee rate in sat/vB multiplied by 1000.
ancestor_size: u64Total virtual size of this entry and all unconfirmed ancestors.
ancestor_fee: u64Total fee of this entry and all unconfirmed ancestors.
descendant_size: u64Total virtual size of this entry and all unconfirmed descendants.
descendant_fee: u64Total fee of this entry and all unconfirmed descendants.
time: u64Mempool acceptance time in monotonically increasing seconds.
height: u32Chain height at acceptance.
Implementations§
Source§impl MempoolEntry
impl MempoolEntry
Sourcepub fn new(
tx: Arc<Transaction>,
vsize: u32,
fee: u64,
time: u64,
height: u32,
) -> Self
pub fn new( tx: Arc<Transaction>, vsize: u32, fee: u64, time: u64, height: u32, ) -> Self
Builds a mempool entry with self-only ancestor and descendant accounting.
Sourcepub const fn ancestor_fee_rate(&self) -> u64
pub const fn ancestor_fee_rate(&self) -> u64
Ancestor package fee rate in sat/vB multiplied by 1000.
Sourcepub const fn descendant_fee_rate(&self) -> u64
pub const fn descendant_fee_rate(&self) -> u64
Descendant package fee rate in sat/vB multiplied by 1000.
Sourcepub fn is_replaceable(&self) -> bool
pub fn is_replaceable(&self) -> bool
Returns whether this transaction signals BIP-125 replaceability
(any input has sequence < 0xFFFF_FFFE).
Bitcoin Core’s bip125-replaceable mempool entry field is derived from
this predicate. Lifted from the inline check in Mempool::iter_replaceable_txids.
Trait Implementations§
Source§impl Clone for MempoolEntry
impl Clone for MempoolEntry
Source§fn clone(&self) -> MempoolEntry
fn clone(&self) -> MempoolEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more