pub struct TxMemPoolEntry {Show 24 fields
pub tx: Arc<Transaction>,
pub fee: Amount,
pub modified_fee: Amount,
pub tx_weight: Weight,
pub time: i64,
pub entry_height: u32,
pub entry_block_mtp: i64,
pub entry_block_hash: BlockHash,
pub entry_sequence: u64,
pub spends_coinbase: bool,
pub sigop_cost: i64,
pub lock_points: LockPoints,
pub count_with_ancestors: u64,
pub size_with_ancestors: i64,
pub fees_with_ancestors: Amount,
pub sigops_with_ancestors: i64,
pub count_with_descendants: u64,
pub size_with_descendants: i64,
pub fees_with_descendants: Amount,
pub parents: HashSet<EntryId>,
pub children: HashSet<EntryId>,
pub cached_ancestor_key: AncestorScoreKey,
pub cached_descendant_key: DescendantScoreKey,
pub idx_randomized: Option<usize>,
}Expand description
Mempool entry with cached ancestor/descendant state.
CRITICAL: Index keys are cached to enable correct reindexing. When mutating ancestor/descendant state, we must:
- Capture the old cached key
- Remove from indices using the old key
- Mutate the entry
- Recompute and cache the new key
- Reinsert using the new key
Fields§
§tx: Arc<Transaction>Transaction data.
fee: AmountBase fee (without priority adjustments).
modified_fee: AmountModified fee (includes priority delta from prioritise_transaction).
tx_weight: WeightCached transaction weight.
time: i64Entry timestamp (seconds since epoch).
entry_height: u32Block height when transaction entered mempool.
entry_block_mtp: i64Median Time Past of the best block when transaction entered mempool.
entry_block_hash: BlockHashBest block hash when transaction entered mempool (for reorg detection).
entry_sequence: u64Sequence number for replay protection.
spends_coinbase: boolWhether this transaction spends a coinbase output.
sigop_cost: i64Signature operation cost.
lock_points: LockPointsLock points for BIP68/BIP112 validation.
count_with_ancestors: u64Number of ancestors (including this tx).
size_with_ancestors: i64Total size of ancestors in virtual bytes (including this tx).
fees_with_ancestors: AmountTotal fees of ancestors (including this tx).
sigops_with_ancestors: i64Total sigop cost of ancestors (including this tx).
count_with_descendants: u64Number of descendants (including this tx).
size_with_descendants: i64Total size of descendants in virtual bytes (including this tx).
fees_with_descendants: AmountTotal fees of descendants (including this tx).
parents: HashSet<EntryId>Parent entries (in-mempool dependencies).
children: HashSet<EntryId>Child entries (in-mempool dependents).
cached_ancestor_key: AncestorScoreKeyCached ancestor score key for efficient reindexing.
cached_descendant_key: DescendantScoreKeyCached descendant score key for efficient reindexing.
idx_randomized: Option<usize>Position in randomized transaction vector (for relay).
Implementations§
Source§impl TxMemPoolEntry
impl TxMemPoolEntry
Sourcepub fn ancestor_feerate(&self) -> i64
pub fn ancestor_feerate(&self) -> i64
Get ancestor feerate.
Sourcepub fn descendant_feerate(&self) -> i64
pub fn descendant_feerate(&self) -> i64
Get descendant feerate.
Sourcepub fn signals_rbf(&self) -> bool
pub fn signals_rbf(&self) -> bool
Check if transaction signals RBF per BIP125.
Returns true if any input has nSequence < 0xfffffffe. BIP125 Rule: Any nSequence value less than 0xfffffffe signals replaceability.
Auto Trait Implementations§
impl Freeze for TxMemPoolEntry
impl RefUnwindSafe for TxMemPoolEntry
impl Send for TxMemPoolEntry
impl Sync for TxMemPoolEntry
impl Unpin for TxMemPoolEntry
impl UnwindSafe for TxMemPoolEntry
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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.