Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show All 15 Lines | |||||
#include <sync.h> | #include <sync.h> | ||||
#include <boost/multi_index/hashed_index.hpp> | #include <boost/multi_index/hashed_index.hpp> | ||||
#include <boost/multi_index/ordered_index.hpp> | #include <boost/multi_index/ordered_index.hpp> | ||||
#include <boost/multi_index/sequenced_index.hpp> | #include <boost/multi_index/sequenced_index.hpp> | ||||
#include <boost/multi_index_container.hpp> | #include <boost/multi_index_container.hpp> | ||||
#include <boost/signals2/signal.hpp> | #include <boost/signals2/signal.hpp> | ||||
#include <atomic> | |||||
#include <map> | #include <map> | ||||
#include <set> | #include <set> | ||||
#include <string> | #include <string> | ||||
#include <utility> | #include <utility> | ||||
#include <vector> | #include <vector> | ||||
class CBlockIndex; | class CBlockIndex; | ||||
class Config; | class Config; | ||||
▲ Show 20 Lines • Show All 431 Lines • ▼ Show 20 Lines | |||||
* CalculateMemPoolAncestors() takes configurable limits that are designed to | * CalculateMemPoolAncestors() takes configurable limits that are designed to | ||||
* prevent these calculations from being too CPU intensive. | * prevent these calculations from being too CPU intensive. | ||||
*/ | */ | ||||
class CTxMemPool { | class CTxMemPool { | ||||
private: | private: | ||||
//! Value n means that n times in 2^32 we check. | //! Value n means that n times in 2^32 we check. | ||||
uint32_t nCheckFrequency GUARDED_BY(cs); | uint32_t nCheckFrequency GUARDED_BY(cs); | ||||
//! Used by getblocktemplate to trigger CreateNewBlock() invocation | //! Used by getblocktemplate to trigger CreateNewBlock() invocation | ||||
unsigned int nTransactionsUpdated; | std::atomic<uint32_t> nTransactionsUpdated; | ||||
//! sum of all mempool tx's sizes. | //! sum of all mempool tx's sizes. | ||||
uint64_t totalTxSize; | uint64_t totalTxSize; | ||||
//! sum of dynamic memory usage of all the map elements (NOT the maps | //! sum of dynamic memory usage of all the map elements (NOT the maps | ||||
//! themselves) | //! themselves) | ||||
uint64_t cachedInnerUsage; | uint64_t cachedInnerUsage; | ||||
mutable int64_t lastRollingFeeUpdate; | mutable int64_t lastRollingFeeUpdate; | ||||
▲ Show 20 Lines • Show All 497 Lines • Show Last 20 Lines |