mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Use mempool's ancestor sort in transaction selection
Transaction selection for mining tracks ancestor feerates that are modified based on transactions that have already been selected. This commit de-duplicates the code so that the ancestor feerate sorting used by the mempool can also be directly applied to the miner.
This commit is contained in:
@@ -352,7 +352,7 @@ void BlockAssembler::addPackageTxs(int &nPackagesSelected, int &nDescendantsUpda
|
||||
// Try to compare the mapTx entry to the mapModifiedTx entry
|
||||
iter = mempool.mapTx.project<0>(mi);
|
||||
if (modit != mapModifiedTx.get<ancestor_score>().end() &&
|
||||
CompareModifiedEntry()(*modit, CTxMemPoolModifiedEntry(iter))) {
|
||||
CompareTxMemPoolEntryByAncestorFee()(*modit, CTxMemPoolModifiedEntry(iter))) {
|
||||
// The best entry in mapModifiedTx has higher score
|
||||
// than the one from mapTx.
|
||||
// Switch which transaction (package) to consider
|
||||
|
||||
Reference in New Issue
Block a user