Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show First 20 Lines • Show All 594 Lines • ▼ Show 20 Lines | private: | ||||
void UpdateParent(txiter entry, txiter parent, bool add); | void UpdateParent(txiter entry, txiter parent, bool add); | ||||
void UpdateChild(txiter entry, txiter child, bool add); | void UpdateChild(txiter entry, txiter child, bool add); | ||||
std::vector<indexed_transaction_set::const_iterator> | std::vector<indexed_transaction_set::const_iterator> | ||||
GetSortedDepthAndScore() const EXCLUSIVE_LOCKS_REQUIRED(cs); | GetSortedDepthAndScore() const EXCLUSIVE_LOCKS_REQUIRED(cs); | ||||
public: | public: | ||||
indirectmap<COutPoint, const CTransaction *> mapNextTx GUARDED_BY(cs); | indirectmap<COutPoint, const CTransaction *> mapNextTx GUARDED_BY(cs); | ||||
std::map<uint256, TXModifier> mapDeltas; | std::map<TxId, TXModifier> mapDeltas; | ||||
/** | /** | ||||
* Create a new CTxMemPool. | * Create a new CTxMemPool. | ||||
*/ | */ | ||||
CTxMemPool(); | CTxMemPool(); | ||||
~CTxMemPool(); | ~CTxMemPool(); | ||||
/** | /** | ||||
Show All 10 Lines | public: | ||||
// addUnchecked must updated state for all ancestors of a given transaction, | // addUnchecked must updated state for all ancestors of a given transaction, | ||||
// to track size/count of descendant transactions. First version of | // to track size/count of descendant transactions. First version of | ||||
// addUnchecked can be used to have it call CalculateMemPoolAncestors(), and | // addUnchecked can be used to have it call CalculateMemPoolAncestors(), and | ||||
// then invoke the second version. | // then invoke the second version. | ||||
// Note that addUnchecked is ONLY called from ATMP outside of tests | // Note that addUnchecked is ONLY called from ATMP outside of tests | ||||
// and any other callers may break wallet's in-mempool tracking (due to | // and any other callers may break wallet's in-mempool tracking (due to | ||||
// lack of CValidationInterface::TransactionAddedToMempool callbacks). | // lack of CValidationInterface::TransactionAddedToMempool callbacks). | ||||
void addUnchecked(const uint256 &hash, const CTxMemPoolEntry &entry) | void addUnchecked(const TxId &txid, const CTxMemPoolEntry &entry) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main); | ||||
void addUnchecked(const uint256 &hash, const CTxMemPoolEntry &entry, | void addUnchecked(const TxId &txid, const CTxMemPoolEntry &entry, | ||||
setEntries &setAncestors) | setEntries &setAncestors) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main); | ||||
void removeRecursive( | void removeRecursive( | ||||
const CTransaction &tx, | const CTransaction &tx, | ||||
MemPoolRemovalReason reason = MemPoolRemovalReason::UNKNOWN); | MemPoolRemovalReason reason = MemPoolRemovalReason::UNKNOWN); | ||||
void removeForReorg(const Config &config, const CCoinsViewCache *pcoins, | void removeForReorg(const Config &config, const CCoinsViewCache *pcoins, | ||||
unsigned int nMemPoolHeight, int flags) | unsigned int nMemPoolHeight, int flags) | ||||
Show All 15 Lines | public: | ||||
* the tx is not dependent on other mempool transactions to be included in a | * the tx is not dependent on other mempool transactions to be included in a | ||||
* block. | * block. | ||||
*/ | */ | ||||
bool HasNoInputsOf(const CTransaction &tx) const; | bool HasNoInputsOf(const CTransaction &tx) const; | ||||
/** Affect CreateNewBlock prioritisation of transactions */ | /** Affect CreateNewBlock prioritisation of transactions */ | ||||
void PrioritiseTransaction(const TxId &txid, double dPriorityDelta, | void PrioritiseTransaction(const TxId &txid, double dPriorityDelta, | ||||
const Amount nFeeDelta); | const Amount nFeeDelta); | ||||
void ApplyDeltas(const uint256 hash, double &dPriorityDelta, | void ApplyDeltas(const TxId &txid, double &dPriorityDelta, | ||||
Amount &nFeeDelta) const; | Amount &nFeeDelta) const; | ||||
void ClearPrioritisation(const uint256 hash); | void ClearPrioritisation(const TxId &txid); | ||||
public: | public: | ||||
/** | /** | ||||
* Remove a set of transactions from the mempool. If a transaction is in | * Remove a set of transactions from the mempool. If a transaction is in | ||||
* this set, then all in-mempool descendants must also be in the set, unless | * this set, then all in-mempool descendants must also be in the set, unless | ||||
* this transaction is being removed for being in a block. Set | * this transaction is being removed for being in a block. Set | ||||
* updateDescendants to true when removing a tx that was in a block, so that | * updateDescendants to true when removing a tx that was in a block, so that | ||||
* any in-mempool descendants have their ancestor state updated. | * any in-mempool descendants have their ancestor state updated. | ||||
▲ Show 20 Lines • Show All 322 Lines • Show Last 20 Lines |