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

Method CopyToStaging

src/txgraph.cpp:1221–1237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1219}
1220
1221Cluster* GenericClusterImpl::CopyToStaging(TxGraphImpl& graph) const noexcept
1222{
1223 // Construct an empty Cluster.
1224 auto ret = graph.CreateEmptyGenericCluster();
1225 auto ptr = ret.get();
1226 // Copy depgraph, mapping, and linearization.
1227 ptr->m_depgraph = m_depgraph;
1228 ptr->m_mapping = m_mapping;
1229 ptr->m_linearization = m_linearization;
1230 // Insert the new Cluster into the graph.
1231 graph.InsertCluster(/*level=*/1, std::move(ret), m_quality);
1232 // Update its Locators.
1233 ptr->Updated(graph, /*level=*/1, /*rename=*/false);
1234 // Update memory usage.
1235 graph.GetClusterSet(/*level=*/1).m_cluster_usage += ptr->TotalMemoryUsage();
1236 return ptr;
1237}
1238
1239Cluster* SingletonClusterImpl::CopyToStaging(TxGraphImpl& graph) const noexcept
1240{

Callers 1

PullInMethod · 0.80

Calls 6

InsertClusterMethod · 0.80
UpdatedMethod · 0.80
TotalMemoryUsageMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected