Bitcoin Core 28.99.0
P2P Digital Currency
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
CTxMemPool::ChangeSet Class Reference

#include <txmempool.h>

Collaboration diagram for CTxMemPool::ChangeSet:
[legend]

Public Types

using TxHandle = CTxMemPool::txiter
 

Public Member Functions

 ChangeSet (CTxMemPool *pool)
 
 ~ChangeSet () EXCLUSIVE_LOCKS_REQUIRED(m_pool -> cs)
 
 ChangeSet (const ChangeSet &)=delete
 
ChangeSetoperator= (const ChangeSet &)=delete
 
TxHandle StageAddition (const CTransactionRef &tx, const CAmount fee, int64_t time, unsigned int entry_height, uint64_t entry_sequence, bool spends_coinbase, int64_t sigops_cost, LockPoints lp)
 
void StageRemoval (CTxMemPool::txiter it)
 
const CTxMemPool::setEntriesGetRemovals () const
 
util::Result< CTxMemPool::setEntriesCalculateMemPoolAncestors (TxHandle tx, const Limits &limits)
 
std::vector< CTransactionRefGetAddedTxns () const
 
util::Result< std::pair< std::vector< FeeFrac >, std::vector< FeeFrac > > > CalculateChunksForRBF ()
 Calculate the sorted chunks for the old and new mempool relating to the clusters that would be affected by a potential replacement transaction. More...
 
size_t GetTxCount () const
 
const CTransactionGetAddedTxn (size_t index) const
 
void Apply () EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 

Private Attributes

CTxMemPoolm_pool
 
CTxMemPool::indexed_transaction_set m_to_add
 
std::vector< CTxMemPool::txiterm_entry_vec
 
std::map< CTxMemPool::txiter, CTxMemPool::setEntries, CompareIteratorByHashm_ancestors
 
CTxMemPool::setEntries m_to_remove
 

Friends

class CTxMemPool
 

Detailed Description

Definition at line 822 of file txmempool.h.

Member Typedef Documentation

◆ TxHandle

Definition at line 830 of file txmempool.h.

Constructor & Destructor Documentation

◆ ChangeSet() [1/2]

CTxMemPool::ChangeSet::ChangeSet ( CTxMemPool pool)
inlineexplicit

Definition at line 824 of file txmempool.h.

◆ ~ChangeSet()

CTxMemPool::ChangeSet::~ChangeSet ( ) -> cs)
inline

Definition at line 825 of file txmempool.h.

◆ ChangeSet() [2/2]

CTxMemPool::ChangeSet::ChangeSet ( const ChangeSet )
delete

Member Function Documentation

◆ Apply()

void CTxMemPool::ChangeSet::Apply ( )

Definition at line 1419 of file txmempool.cpp.

◆ CalculateChunksForRBF()

util::Result< std::pair< std::vector< FeeFrac >, std::vector< FeeFrac > > > CTxMemPool::ChangeSet::CalculateChunksForRBF ( )

Calculate the sorted chunks for the old and new mempool relating to the clusters that would be affected by a potential replacement transaction.

Returns
old and new diagram pair respectively, or an error string if the conflicts don't match a calculable topology

Definition at line 1315 of file txmempool.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateMemPoolAncestors()

util::Result< CTxMemPool::setEntries > CTxMemPool::ChangeSet::CalculateMemPoolAncestors ( TxHandle  tx,
const Limits limits 
)
inline

Definition at line 837 of file txmempool.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAddedTxn()

const CTransaction & CTxMemPool::ChangeSet::GetAddedTxn ( size_t  index) const
inline

Definition at line 869 of file txmempool.h.

◆ GetAddedTxns()

std::vector< CTransactionRef > CTxMemPool::ChangeSet::GetAddedTxns ( ) const
inline

Definition at line 851 of file txmempool.h.

◆ GetRemovals()

const CTxMemPool::setEntries & CTxMemPool::ChangeSet::GetRemovals ( ) const
inline

Definition at line 835 of file txmempool.h.

◆ GetTxCount()

size_t CTxMemPool::ChangeSet::GetTxCount ( ) const
inline

Definition at line 868 of file txmempool.h.

◆ operator=()

ChangeSet & CTxMemPool::ChangeSet::operator= ( const ChangeSet )
delete

◆ StageAddition()

CTxMemPool::ChangeSet::TxHandle CTxMemPool::ChangeSet::StageAddition ( const CTransactionRef tx,
const CAmount  fee,
int64_t  time,
unsigned int  entry_height,
uint64_t  entry_sequence,
bool  spends_coinbase,
int64_t  sigops_cost,
LockPoints  lp 
)

Definition at line 1406 of file txmempool.cpp.

Here is the call graph for this function:

◆ StageRemoval()

void CTxMemPool::ChangeSet::StageRemoval ( CTxMemPool::txiter  it)
inline

Definition at line 833 of file txmempool.h.

Friends And Related Function Documentation

◆ CTxMemPool

friend class CTxMemPool
friend

Definition at line 881 of file txmempool.h.

Member Data Documentation

◆ m_ancestors

std::map<CTxMemPool::txiter, CTxMemPool::setEntries, CompareIteratorByHash> CTxMemPool::ChangeSet::m_ancestors
private

Definition at line 878 of file txmempool.h.

◆ m_entry_vec

std::vector<CTxMemPool::txiter> CTxMemPool::ChangeSet::m_entry_vec
private

Definition at line 876 of file txmempool.h.

◆ m_pool

CTxMemPool* CTxMemPool::ChangeSet::m_pool
private

Definition at line 874 of file txmempool.h.

◆ m_to_add

CTxMemPool::indexed_transaction_set CTxMemPool::ChangeSet::m_to_add
private

Definition at line 875 of file txmempool.h.

◆ m_to_remove

CTxMemPool::setEntries CTxMemPool::ChangeSet::m_to_remove
private

Definition at line 879 of file txmempool.h.


The documentation for this class was generated from the following files: