[refactor] Add helper for retrieving mempool entry

In places where the iterator is only needed for accessing the actual
entry, it should not be required to first retrieve the iterator.
This commit is contained in:
TheCharlatan
2023-11-02 15:50:45 +01:00
parent 453b4813eb
commit 1c6a73abbd
5 changed files with 26 additions and 18 deletions

View File

@@ -684,6 +684,8 @@ public:
return (mapTx.count(gtxid.GetHash()) != 0);
}
const CTxMemPoolEntry* GetEntry(const Txid& txid) const LIFETIMEBOUND EXCLUSIVE_LOCKS_REQUIRED(cs);
CTransactionRef get(const uint256& hash) const;
txiter get_iter_from_wtxid(const uint256& wtxid) const EXCLUSIVE_LOCKS_REQUIRED(cs)
{