MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetSortedScoreWithTopology

Method GetSortedScoreWithTopology

src/txmempool.cpp:572–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570}
571
572std::vector<CTxMemPool::indexed_transaction_set::const_iterator> CTxMemPool::GetSortedScoreWithTopology() const
573{
574 std::vector<indexed_transaction_set::const_iterator> iters;
575 AssertLockHeld(cs);
576
577 iters.reserve(mapTx.size());
578
579 for (indexed_transaction_set::iterator mi = mapTx.begin(); mi != mapTx.end(); ++mi) {
580 iters.push_back(mi);
581 }
582 std::sort(iters.begin(), iters.end(), [this](const auto& a, const auto& b) EXCLUSIVE_LOCKS_REQUIRED(cs) noexcept {
583 return m_txgraph->CompareMainOrder(*a, *b) < 0;
584 });
585 return iters;
586}
587
588std::vector<CTxMemPoolEntryRef> CTxMemPool::entryAll() const
589{

Callers

nothing calls this directly

Calls 7

CompareMainOrderMethod · 0.80
EXCLUSIVE_LOCKS_REQUIREDFunction · 0.70
reserveMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected