refactor: use const reference for parents in CTxMemPool::UpdateAncestorsOf
This commit is contained in:
1 parent
577b0ffd2e
commit
9947ce6262
1 file changed
+1
-1
+1
-1
@@ -276,7 +276,7 @@ bool CTxMemPool::CalculateMemPoolAncestors(const CTxMemPoolEntry &entry,
|
|||||||
|
|
||||||
void CTxMemPool::UpdateAncestorsOf(bool add, txiter it, setEntries &setAncestors)
|
void CTxMemPool::UpdateAncestorsOf(bool add, txiter it, setEntries &setAncestors)
|
||||||
{
|
{
|
||||||
CTxMemPoolEntry::Parents parents = it->GetMemPoolParents();
|
const CTxMemPoolEntry::Parents& parents = it->GetMemPoolParentsConst();
|
||||||
// add or remove this tx as a child of each parent
|
// add or remove this tx as a child of each parent
|
||||||
for (const CTxMemPoolEntry& parent : parents) {
|
for (const CTxMemPoolEntry& parent : parents) {
|
||||||
UpdateChild(mapTx.iterator_to(parent), it, add);
|
UpdateChild(mapTx.iterator_to(parent), it, add);
|
||||||
|
|||||||
Reference in new issue
Block a user