diff --git a/src/miner.cpp b/src/miner.cpp --- a/src/miner.cpp +++ b/src/miner.cpp @@ -591,6 +591,19 @@ } } +// We want to sort transactions by coin age priority +typedef std::pair TxCoinAgePriority; + +struct TxCoinAgePriorityCompare { + bool operator()(const TxCoinAgePriority &a, const TxCoinAgePriority &b) { + if (a.first == b.first) { + // Reverse order to make sort less than + return CompareTxMemPoolEntryByScore()(*(b.second), *(a.second)); + } + return a.first < b.first; + } +}; + void BlockAssembler::addPriorityTxs() { // How much of the block should be dedicated to high-priority transactions, // included regardless of the fees they pay. diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -809,19 +809,6 @@ bool HaveCoin(const COutPoint &outpoint) const override; }; -// We want to sort transactions by coin age priority -typedef std::pair TxCoinAgePriority; - -struct TxCoinAgePriorityCompare { - bool operator()(const TxCoinAgePriority &a, const TxCoinAgePriority &b) { - if (a.first == b.first) { - // Reverse order to make sort less than - return CompareTxMemPoolEntryByScore()(*(b.second), *(a.second)); - } - return a.first < b.first; - } -}; - /** * DisconnectedBlockTransactions *