Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 1,295 Lines • ▼ Show 20 Lines | while (candidates.size()) { | ||||
candidates.push_back(mapTx.iterator_to(i)); | candidates.push_back(mapTx.iterator_to(i)); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
return maximum; | return maximum; | ||||
} | } | ||||
void CTxMemPool::GetTransactionAncestry(const TxId &txid, size_t &ancestors, | void CTxMemPool::GetTransactionAncestry(const TxId &txid, size_t &ancestors, | ||||
size_t &descendants) const { | size_t &descendants, | ||||
size_t *const ancestorsize, | |||||
Amount *const ancestorfees) const { | |||||
LOCK(cs); | LOCK(cs); | ||||
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(); | ||||
if (ancestorsize) { | |||||
*ancestorsize = it->GetSizeWithAncestors(); | |||||
} | |||||
if (ancestorfees) { | |||||
*ancestorfees = it->GetModFeesWithAncestors(); | |||||
} | |||||
descendants = CalculateDescendantMaximum(it); | descendants = CalculateDescendantMaximum(it); | ||||
} | } | ||||
} | } | ||||
bool CTxMemPool::IsLoaded() const { | bool CTxMemPool::IsLoaded() const { | ||||
LOCK(cs); | LOCK(cs); | ||||
return m_is_loaded; | return m_is_loaded; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 152 Lines • Show Last 20 Lines |