Skip to content

Commit df529dc

Browse files
committed
Merge #12693: Remove unused variable in SortForBlock
bb079a0 Remove unused variable in SortForBlock (Drew Rasmussen) Pull request description: Although txiter is passed to BlockAssembler::SortForBlock, it is never used. Other than BlockAssembler::addPackageTxs, no other method ever makes a call to SortForBlock, thus making this change harmless. Tree-SHA512: c7df948c5f75f7371844200e0227a26476437f300148d29020e01041b382f5bda31d9c520c9c5425aee88ce8f4a52cd0e594985d69ed8a081b878cda2e4de8c5
2 parents 947c25e + bb079a0 commit df529dc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/miner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ bool BlockAssembler::SkipMapTxEntry(CTxMemPool::txiter it, indexed_modified_tran
282282
return mapModifiedTx.count(it) || inBlock.count(it) || failedTx.count(it);
283283
}
284284

285-
void BlockAssembler::SortForBlock(const CTxMemPool::setEntries& package, CTxMemPool::txiter entry, std::vector<CTxMemPool::txiter>& sortedEntries)
285+
void BlockAssembler::SortForBlock(const CTxMemPool::setEntries& package, std::vector<CTxMemPool::txiter>& sortedEntries)
286286
{
287287
// Sort package by ancestor count
288288
// If a transaction A depends on transaction B, then A's ancestor count
@@ -418,7 +418,7 @@ void BlockAssembler::addPackageTxs(int &nPackagesSelected, int &nDescendantsUpda
418418

419419
// Package can be added. Sort the entries in a valid order.
420420
std::vector<CTxMemPool::txiter> sortedEntries;
421-
SortForBlock(ancestors, iter, sortedEntries);
421+
SortForBlock(ancestors, sortedEntries);
422422

423423
for (size_t i=0; i<sortedEntries.size(); ++i) {
424424
AddToBlock(sortedEntries[i]);

src/miner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class BlockAssembler
185185
* or if the transaction's cached data in mapTx is incorrect. */
186186
bool SkipMapTxEntry(CTxMemPool::txiter it, indexed_modified_transaction_set &mapModifiedTx, CTxMemPool::setEntries &failedTx);
187187
/** Sort the package in an order that is valid to appear in a block */
188-
void SortForBlock(const CTxMemPool::setEntries& package, CTxMemPool::txiter entry, std::vector<CTxMemPool::txiter>& sortedEntries);
188+
void SortForBlock(const CTxMemPool::setEntries& package, std::vector<CTxMemPool::txiter>& sortedEntries);
189189
/** Add descendants of given transactions to mapModifiedTx with ancestor
190190
* state updated assuming given transactions are inBlock. Returns number
191191
* of updated descendants. */

0 commit comments

Comments
 (0)