MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ProcessDependencies

Method ProcessDependencies

src/txmempool.cpp:1050–1070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1048}
1049
1050void CTxMemPool::ChangeSet::ProcessDependencies()
1051{
1052 LOCK(m_pool->cs);
1053 Assume(!m_dependencies_processed); // should only call this once.
1054 for (const auto& entryptr : m_entry_vec) {
1055 for (const auto &txin : entryptr->GetSharedTx()->vin) {
1056 std::optional<txiter> piter = m_pool->GetIter(txin.prevout.hash);
1057 if (!piter) {
1058 auto it = m_to_add.find(txin.prevout.hash);
1059 if (it != m_to_add.end()) {
1060 piter = std::make_optional(it);
1061 }
1062 }
1063 if (piter) {
1064 m_pool->m_txgraph->AddDependency(/*parent=*/**piter, /*child=*/*entryptr);
1065 }
1066 }
1067 }
1068 m_dependencies_processed = true;
1069 return;
1070 }
1071
1072bool CTxMemPool::ChangeSet::CheckMemPoolPolicyLimits()
1073{

Callers

nothing calls this directly

Calls 5

GetSharedTxMethod · 0.80
GetIterMethod · 0.80
findMethod · 0.80
endMethod · 0.45
AddDependencyMethod · 0.45

Tested by

no test coverage detected