diff options
| author | Pieter Wuille <[email protected]> | 2018-03-15 16:12:47 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2018-03-15 16:31:02 -0700 |
| commit | df529dcc65e8037c5a3a3ad74545be294a770f07 (patch) | |
| tree | ffcad605b7463ced3b12e47a02151498ef99d8e9 /src | |
| parent | Merge #12431: Only call NotifyBlockTip when chainActive changes (diff) | |
| parent | Remove unused variable in SortForBlock (diff) | |
| download | discoin-df529dcc65e8037c5a3a3ad74545be294a770f07.tar.xz discoin-df529dcc65e8037c5a3a3ad74545be294a770f07.zip | |
Merge #12693: Remove unused variable in SortForBlock
bb079a0e2c 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
Diffstat (limited to 'src')
| -rw-r--r-- | src/miner.cpp | 4 | ||||
| -rw-r--r-- | src/miner.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index fcb376c6c..4b8644677 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -282,7 +282,7 @@ bool BlockAssembler::SkipMapTxEntry(CTxMemPool::txiter it, indexed_modified_tran return mapModifiedTx.count(it) || inBlock.count(it) || failedTx.count(it); } -void BlockAssembler::SortForBlock(const CTxMemPool::setEntries& package, CTxMemPool::txiter entry, std::vector<CTxMemPool::txiter>& sortedEntries) +void BlockAssembler::SortForBlock(const CTxMemPool::setEntries& package, std::vector<CTxMemPool::txiter>& sortedEntries) { // Sort package by ancestor count // If a transaction A depends on transaction B, then A's ancestor count @@ -418,7 +418,7 @@ void BlockAssembler::addPackageTxs(int &nPackagesSelected, int &nDescendantsUpda // Package can be added. Sort the entries in a valid order. std::vector<CTxMemPool::txiter> sortedEntries; - SortForBlock(ancestors, iter, sortedEntries); + SortForBlock(ancestors, sortedEntries); for (size_t i=0; i<sortedEntries.size(); ++i) { AddToBlock(sortedEntries[i]); diff --git a/src/miner.h b/src/miner.h index 9c086332d..33a22ba75 100644 --- a/src/miner.h +++ b/src/miner.h @@ -185,7 +185,7 @@ private: * or if the transaction's cached data in mapTx is incorrect. */ bool SkipMapTxEntry(CTxMemPool::txiter it, indexed_modified_transaction_set &mapModifiedTx, CTxMemPool::setEntries &failedTx); /** Sort the package in an order that is valid to appear in a block */ - void SortForBlock(const CTxMemPool::setEntries& package, CTxMemPool::txiter entry, std::vector<CTxMemPool::txiter>& sortedEntries); + void SortForBlock(const CTxMemPool::setEntries& package, std::vector<CTxMemPool::txiter>& sortedEntries); /** Add descendants of given transactions to mapModifiedTx with ancestor * state updated assuming given transactions are inBlock. Returns number * of updated descendants. */ |