[#CTxMemPoolEntry]
= CTxMemPoolEntry
:mrdocs:

CTxMemPoolEntry stores data about the corresponding transaction, as well as data about all in&hyphen;mempool transactions that depend on the transaction (&quot;descendant&quot; transactions)&period;

== Synopsis

Declared in `&lt;kernel&sol;mempool&lowbar;entry&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class CTxMemPoolEntry
    : public xref:TxGraph/Ref.adoc[TxGraph::Ref]
----

== Description

When a new entry is added to the mempool, we update the descendant state (m&lowbar;count&lowbar;with&lowbar;descendants, nSizeWithDescendants, and nModFeesWithDescendants) for all ancestors of the newly added transaction&period;

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:TxGraph/Ref.adoc[TxGraph::Ref]`
| Data type used to reference transactions within a TxGraph&period;
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:CTxMemPoolEntry/CTxMemPoolEntryRef.adoc[`CTxMemPoolEntryRef`] 
| A reference to a constant mempool entry&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:CTxMemPoolEntry/2constructor-09.adoc[`CTxMemPoolEntry`]         [.small]#[constructor]#
| Constructors
| xref:CTxMemPoolEntry/2destructor.adoc[`&#126;CTxMemPoolEntry`] [.small]#[destructor]# [.small]#[virtual]#
| Destroys the mempool entry&period;
| xref:CTxMemPoolEntry/operator_assign-024.adoc[`operator&equals;`] 
| Assignment operators
| xref:CTxMemPoolEntry/DynamicMemoryUsage.adoc[`DynamicMemoryUsage`] 
| Returns the dynamic memory used by the entry&period;
| xref:CTxMemPoolEntry/GetAdjustedWeight.adoc[`GetAdjustedWeight`] 
| Returns the sigop&hyphen;adjusted weight of the transaction&period;
| xref:CTxMemPoolEntry/GetFee.adoc[`GetFee`] 
| Returns the fee the transaction paid&period;
| xref:CTxMemPoolEntry/GetHeight.adoc[`GetHeight`] 
| Returns the chain height when the transaction entered the mempool&period;
| xref:CTxMemPoolEntry/GetLockPoints.adoc[`GetLockPoints`] 
| Returns the lock points of the transaction&period;
| xref:CTxMemPoolEntry/GetModifiedFee.adoc[`GetModifiedFee`] 
| Returns the fee adjusted for mining priority&period;
| xref:CTxMemPoolEntry/GetSequence.adoc[`GetSequence`] 
| Returns the sequence number assigned to the transaction&period;
| xref:CTxMemPoolEntry/GetSharedTx.adoc[`GetSharedTx`] 
| Returns a shared pointer to the stored transaction&period;
| xref:CTxMemPoolEntry/GetSigOpCost.adoc[`GetSigOpCost`] 
| Returns the total sigop cost of the transaction&period;
| xref:CTxMemPoolEntry/GetSpendsCoinbase.adoc[`GetSpendsCoinbase`] 
| Returns whether the transaction spends a coinbase output&period;
| xref:CTxMemPoolEntry/GetTime.adoc[`GetTime`] 
| Returns the local time when the transaction entered the mempool&period;
| xref:CTxMemPoolEntry/GetTx.adoc[`GetTx`] 
| Returns the stored transaction&period;
| xref:CTxMemPoolEntry/GetTxSize.adoc[`GetTxSize`] 
| Returns the virtual size of the transaction&period;
| xref:CTxMemPoolEntry/GetTxWeight.adoc[`GetTxWeight`] 
| Returns the weight of the transaction&period;
| xref:CTxMemPoolEntry/UpdateLockPoints.adoc[`UpdateLockPoints`] 
| Updates the lock points after a reorg&period;
| xref:CTxMemPoolEntry/UpdateModifiedFee.adoc[`UpdateModifiedFee`] 
| Updates the modified fee with the descendant or ancestor delta&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:CTxMemPoolEntry/idx_randomized.adoc[`idx&lowbar;randomized`] 
| Index in mempool&apos;s txns&lowbar;randomized
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
