Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show All 24 Lines | |||||
#include <set> | #include <set> | ||||
#include <string> | #include <string> | ||||
#include <utility> | #include <utility> | ||||
#include <vector> | #include <vector> | ||||
class CBlockIndex; | class CBlockIndex; | ||||
class Config; | class Config; | ||||
extern CCriticalSection cs_main; | |||||
inline double AllowFreeThreshold() { | inline double AllowFreeThreshold() { | ||||
return (144 * COIN) / (250 * SATOSHI); | return (144 * COIN) / (250 * SATOSHI); | ||||
} | } | ||||
inline bool AllowFree(double dPriority) { | inline bool AllowFree(double dPriority) { | ||||
// Large (in bytes) low-priority (new, small-coin) transactions need a fee. | // Large (in bytes) low-priority (new, small-coin) transactions need a fee. | ||||
return dPriority > AllowFreeThreshold(); | return dPriority > AllowFreeThreshold(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 549 Lines • ▼ Show 20 Lines | public: | ||||
bool addUnchecked(const uint256 &hash, const CTxMemPoolEntry &entry); | bool addUnchecked(const uint256 &hash, const CTxMemPoolEntry &entry); | ||||
bool addUnchecked(const uint256 &hash, const CTxMemPoolEntry &entry, | bool addUnchecked(const uint256 &hash, const CTxMemPoolEntry &entry, | ||||
setEntries &setAncestors); | setEntries &setAncestors); | ||||
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); | |||||
void removeConflicts(const CTransaction &tx); | void removeConflicts(const CTransaction &tx); | ||||
void removeForBlock(const std::vector<CTransactionRef> &vtx, | void removeForBlock(const std::vector<CTransactionRef> &vtx, | ||||
unsigned int nBlockHeight); | unsigned int nBlockHeight); | ||||
void clear(); | void clear(); | ||||
// lock free | // lock free | ||||
void _clear() EXCLUSIVE_LOCKS_REQUIRED(cs); | void _clear() EXCLUSIVE_LOCKS_REQUIRED(cs); | ||||
bool CompareDepthAndScore(const uint256 &hasha, const uint256 &hashb); | bool CompareDepthAndScore(const uint256 &hasha, const uint256 &hashb); | ||||
▲ Show 20 Lines • Show All 339 Lines • Show Last 20 Lines |