MCPcopy Create free account
hub / github.com/ElementsProject/elements / UpdateChild

Method UpdateChild

src/txmempool.cpp:1185–1194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1183}
1184
1185void CTxMemPool::UpdateChild(txiter entry, txiter child, bool add)
1186{
1187 AssertLockHeld(cs);
1188 CTxMemPoolEntry::Children s;
1189 if (add && entry->GetMemPoolChildren().insert(*child).second) {
1190 cachedInnerUsage += memusage::IncrementalDynamicUsage(s);
1191 } else if (!add && entry->GetMemPoolChildren().erase(*child)) {
1192 cachedInnerUsage -= memusage::IncrementalDynamicUsage(s);
1193 }
1194}
1195
1196void CTxMemPool::UpdateParent(txiter entry, txiter parent, bool add)
1197{

Callers

nothing calls this directly

Calls 3

IncrementalDynamicUsageFunction · 0.85
insertMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected