Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 865 Lines • ▼ Show 20 Lines | for (indexed_transaction_set::iterator mi = mapTx.begin(); | ||||
mi != mapTx.end(); ++mi) { | mi != mapTx.end(); ++mi) { | ||||
iters.push_back(mi); | iters.push_back(mi); | ||||
} | } | ||||
std::sort(iters.begin(), iters.end(), DepthAndScoreComparator()); | std::sort(iters.begin(), iters.end(), DepthAndScoreComparator()); | ||||
return iters; | return iters; | ||||
} | } | ||||
void CTxMemPool::queryHashes(std::vector<uint256> &vtxid) { | void CTxMemPool::queryHashes(std::vector<uint256> &vtxid) const { | ||||
LOCK(cs); | LOCK(cs); | ||||
auto iters = GetSortedDepthAndScore(); | auto iters = GetSortedDepthAndScore(); | ||||
vtxid.clear(); | vtxid.clear(); | ||||
vtxid.reserve(mapTx.size()); | vtxid.reserve(mapTx.size()); | ||||
for (auto it : iters) { | for (auto it : iters) { | ||||
vtxid.push_back(it->GetTx().GetId()); | vtxid.push_back(it->GetTx().GetId()); | ||||
▲ Show 20 Lines • Show All 505 Lines • Show Last 20 Lines |