diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2018-01-13 15:57:30 -0500 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@gmail.com> | 2018-01-13 15:57:30 -0500 |
commit | 0a22a52918ad5af6d105b4f5ae9dd6c52199f0e8 (patch) | |
tree | cdfe7f594d10c2c80a3f49a8c014fa6b191f94e5 /src/miner.cpp | |
parent | 7abfa538b5a4508e0cf0589ae3ac0620b2188912 (diff) |
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.
Diffstat (limited to 'src/miner.cpp')
-rw-r--r-- | src/miner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index 4e63ab4df0..dda52790c6 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -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 |