Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 1,232 Lines • ▼ Show 20 Lines | void CTxMemPool::GetTransactionAncestry(const uint256 &txid, size_t &ancestors, | ||||
auto it = mapTx.find(txid); | auto it = mapTx.find(txid); | ||||
ancestors = descendants = 0; | ancestors = descendants = 0; | ||||
if (it != mapTx.end()) { | if (it != mapTx.end()) { | ||||
ancestors = it->GetCountWithAncestors(); | ancestors = it->GetCountWithAncestors(); | ||||
descendants = CalculateDescendantMaximum(it); | descendants = CalculateDescendantMaximum(it); | ||||
} | } | ||||
} | } | ||||
bool CTxMemPool::IsLoaded() const { | |||||
LOCK(cs); | |||||
return m_is_loaded; | |||||
} | |||||
void CTxMemPool::SetIsLoaded(bool loaded) { | |||||
LOCK(cs); | |||||
m_is_loaded = loaded; | |||||
} | |||||
SaltedTxidHasher::SaltedTxidHasher() | SaltedTxidHasher::SaltedTxidHasher() | ||||
: k0(GetRand(std::numeric_limits<uint64_t>::max())), | : k0(GetRand(std::numeric_limits<uint64_t>::max())), | ||||
k1(GetRand(std::numeric_limits<uint64_t>::max())) {} | k1(GetRand(std::numeric_limits<uint64_t>::max())) {} | ||||
/** Maximum bytes for transactions to store for processing during reorg */ | /** Maximum bytes for transactions to store for processing during reorg */ | ||||
static const size_t MAX_DISCONNECTED_TX_POOL_SIZE = 20 * DEFAULT_MAX_BLOCK_SIZE; | static const size_t MAX_DISCONNECTED_TX_POOL_SIZE = 20 * DEFAULT_MAX_BLOCK_SIZE; | ||||
void DisconnectedBlockTransactions::addForBlock( | void DisconnectedBlockTransactions::addForBlock( | ||||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |