diff --git a/src/test/mempool_tests.cpp b/src/test/mempool_tests.cpp --- a/src/test/mempool_tests.cpp +++ b/src/test/mempool_tests.cpp @@ -455,35 +455,6 @@ pool.removeRecursive(pool.mapTx.find(tx9.GetId())->GetTx()); pool.removeRecursive(pool.mapTx.find(tx8.GetId())->GetTx()); - /* Now check the sort on the mining score index. - * Final order should be: - * - * tx7 (2M) - * tx2 (20k) - * tx4 (15000) - * tx1/tx5 (10000) - * tx3/6 (0) - * (Ties resolved by hash) - */ - sortedOrder.clear(); - sortedOrder.push_back(tx7.GetId().ToString()); - sortedOrder.push_back(tx2.GetId().ToString()); - sortedOrder.push_back(tx4.GetId().ToString()); - if (tx1.GetId() < tx5.GetId()) { - sortedOrder.push_back(tx5.GetId().ToString()); - sortedOrder.push_back(tx1.GetId().ToString()); - } else { - sortedOrder.push_back(tx1.GetId().ToString()); - sortedOrder.push_back(tx5.GetId().ToString()); - } - if (tx3.GetId() < tx6.GetId()) { - sortedOrder.push_back(tx6.GetId().ToString()); - sortedOrder.push_back(tx3.GetId().ToString()); - } else { - sortedOrder.push_back(tx3.GetId().ToString()); - sortedOrder.push_back(tx6.GetId().ToString()); - } - CheckSort(pool, sortedOrder, "MempoolIndexingTest8"); } BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest) { diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -323,7 +323,6 @@ // Multi_index tag names struct descendant_score {}; struct entry_time {}; -struct mining_score {}; struct ancestor_score {}; /** @@ -398,8 +397,6 @@ * - transaction hash * - feerate [we use max(feerate of tx, feerate of tx with all descendants)] * - time in mempool - * - mining score (feerate modified by any fee deltas from - * PrioritiseTransaction) * * Note: the term "descendant" refers to in-mempool transactions that depend on * this one, while "ancestor" refers to in-mempool transactions that a given @@ -490,11 +487,6 @@ boost::multi_index::tag, boost::multi_index::identity, CompareTxMemPoolEntryByEntryTime>, - // sorted by score (for mining prioritization) - boost::multi_index::ordered_unique< - boost::multi_index::tag, - boost::multi_index::identity, - CompareTxMemPoolEntryByScore>, // sorted by fee rate with ancestors boost::multi_index::ordered_non_unique< boost::multi_index::tag, diff --git a/src/txmempool.cpp b/src/txmempool.cpp --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -1037,10 +1037,10 @@ size_t CTxMemPool::DynamicMemoryUsage() const { LOCK(cs); - // Estimate the overhead of mapTx to be 15 pointers + an allocation, as no + // Estimate the overhead of mapTx to be 12 pointers + an allocation, as no // exact formula for boost::multi_index_contained is implemented. return memusage::MallocUsage(sizeof(CTxMemPoolEntry) + - 15 * sizeof(void *)) * + 12 * sizeof(void *)) * mapTx.size() + memusage::DynamicUsage(mapNextTx) + memusage::DynamicUsage(mapDeltas) +