[refactor] rewrite vTxHashes as a vector of CTransactionRef

vTxHashes exposes a complex mapTx iterator type that its external users
don't need. Directly populate it with CTransactionRef instead.
This commit is contained in:
glozow
2023-08-25 17:01:51 +01:00
committed by TheCharlatan
parent 938643c3b2
commit a03aef9cec
4 changed files with 10 additions and 8 deletions

View File

@@ -392,7 +392,7 @@ public:
indexed_transaction_set mapTx GUARDED_BY(cs);
using txiter = indexed_transaction_set::nth_index<0>::type::const_iterator;
std::vector<std::pair<uint256, txiter>> vTxHashes GUARDED_BY(cs); //!< All tx witness hashes/entries in mapTx, in random order
std::vector<CTransactionRef> vTxHashes GUARDED_BY(cs); //!< All transactions in mapTx, in random order
typedef std::set<txiter, CompareIteratorByHash> setEntries;