Skip to content

Commit 9947ce6

Browse files
committed
refactor: use const reference for parents in CTxMemPool::UpdateAncestorsOf
1 parent 577b0ff commit 9947ce6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/txmempool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ bool CTxMemPool::CalculateMemPoolAncestors(const CTxMemPoolEntry &entry,
276276

277277
void CTxMemPool::UpdateAncestorsOf(bool add, txiter it, setEntries &setAncestors)
278278
{
279-
CTxMemPoolEntry::Parents parents = it->GetMemPoolParents();
279+
const CTxMemPoolEntry::Parents& parents = it->GetMemPoolParentsConst();
280280
// add or remove this tx as a child of each parent
281281
for (const CTxMemPoolEntry& parent : parents) {
282282
UpdateChild(mapTx.iterator_to(parent), it, add);

0 commit comments

Comments
 (0)