Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show First 20 Lines • Show All 583 Lines • ▼ Show 20 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). | ||||
bool addUnchecked(const uint256 &hash, const CTxMemPoolEntry &entry); | bool addUnchecked(const uint256 &hash, const CTxMemPoolEntry &entry) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs); | |||||
bool addUnchecked(const uint256 &hash, const CTxMemPoolEntry &entry, | bool addUnchecked(const uint256 &hash, const CTxMemPoolEntry &entry, | ||||
setEntries &setAncestors); | setEntries &setAncestors) EXCLUSIVE_LOCKS_REQUIRED(cs); | ||||
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) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
void removeConflicts(const CTransaction &tx) EXCLUSIVE_LOCKS_REQUIRED(cs); | void removeConflicts(const CTransaction &tx) EXCLUSIVE_LOCKS_REQUIRED(cs); | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | public: | ||||
* fSearchForParents = whether to search a tx's vin for in-mempool parents, | * fSearchForParents = whether to search a tx's vin for in-mempool parents, | ||||
* or look up parents from mapLinks. Must be true for entries not in the | * or look up parents from mapLinks. Must be true for entries not in the | ||||
* mempool | * mempool | ||||
*/ | */ | ||||
bool CalculateMemPoolAncestors( | bool CalculateMemPoolAncestors( | ||||
const CTxMemPoolEntry &entry, setEntries &setAncestors, | const CTxMemPoolEntry &entry, setEntries &setAncestors, | ||||
uint64_t limitAncestorCount, uint64_t limitAncestorSize, | uint64_t limitAncestorCount, uint64_t limitAncestorSize, | ||||
uint64_t limitDescendantCount, uint64_t limitDescendantSize, | uint64_t limitDescendantCount, uint64_t limitDescendantSize, | ||||
std::string &errString, bool fSearchForParents = true) const; | std::string &errString, bool fSearchForParents = true) const | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs); | |||||
/** | /** | ||||
* Populate setDescendants with all in-mempool descendants of hash. | * Populate setDescendants with all in-mempool descendants of hash. | ||||
* Assumes that setDescendants includes all in-mempool descendants of | * Assumes that setDescendants includes all in-mempool descendants of | ||||
* anything already in it. | * anything already in it. | ||||
*/ | */ | ||||
void CalculateDescendants(txiter it, setEntries &setDescendants) const | void CalculateDescendants(txiter it, setEntries &setDescendants) const | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs); | EXCLUSIVE_LOCKS_REQUIRED(cs); | ||||
▲ Show 20 Lines • Show All 270 Lines • Show Last 20 Lines |