Changeset View
Changeset View
Standalone View
Standalone View
src/miner.h
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | |||||
// This is sufficient to sort an ancestor package in an order that is valid | // This is sufficient to sort an ancestor package in an order that is valid | ||||
// to appear in a block. | // to appear in a block. | ||||
struct CompareTxIterByAncestorCount { | struct CompareTxIterByAncestorCount { | ||||
bool operator()(const CTxMemPool::txiter &a, | bool operator()(const CTxMemPool::txiter &a, | ||||
const CTxMemPool::txiter &b) const { | const CTxMemPool::txiter &b) const { | ||||
if (a->GetCountWithAncestors() != b->GetCountWithAncestors()) { | if (a->GetCountWithAncestors() != b->GetCountWithAncestors()) { | ||||
return a->GetCountWithAncestors() < b->GetCountWithAncestors(); | return a->GetCountWithAncestors() < b->GetCountWithAncestors(); | ||||
} | } | ||||
return CTxMemPool::CompareIteratorById()(a, b); | return CompareIteratorById()(a, b); | ||||
} | } | ||||
}; | }; | ||||
typedef boost::multi_index_container< | typedef boost::multi_index_container< | ||||
CTxMemPoolModifiedEntry, | CTxMemPoolModifiedEntry, | ||||
boost::multi_index::indexed_by< | boost::multi_index::indexed_by< | ||||
boost::multi_index::ordered_unique<modifiedentry_iter, | boost::multi_index::ordered_unique<modifiedentry_iter, | ||||
CompareCTxMemPoolIter>, | CompareCTxMemPoolIter>, | ||||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |