[refactor] Add helper for iterating through mempool entries

Instead of reaching into the mapTx data structure, use a helper method
that provides the required vector of CTxMemPoolEntry pointers.
This commit is contained in:
stickies-v
2023-11-09 17:51:20 +01:00
committed by TheCharlatan
parent d9007f51a7
commit 453b4813eb
5 changed files with 18 additions and 4 deletions

View File

@@ -806,7 +806,7 @@ public:
{
if (!m_node.mempool) return;
LOCK2(::cs_main, m_node.mempool->cs);
for (const CTxMemPoolEntry& entry : m_node.mempool->mapTx) {
for (const CTxMemPoolEntry& entry : m_node.mempool->entryAll()) {
notifications.transactionAddedToMempool(entry.GetSharedTx());
}
}