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

Method StartStaging

src/txgraph.cpp:2626–2648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2624}
2625
2626void TxGraphImpl::StartStaging() noexcept
2627{
2628 // Staging cannot already exist.
2629 Assume(!m_staging_clusterset.has_value());
2630 // Apply all remaining dependencies in main before creating a staging graph. Once staging
2631 // exists, we cannot merge Clusters anymore (because of interference with Clusters being
2632 // pulled into staging), so to make sure all inspectors are available (if not oversized), do
2633 // all merging work now. Call SplitAll() first, so that even if ApplyDependencies does not do
2634 // any thing due to knowing the result is oversized, splitting is still performed.
2635 SplitAll(0);
2636 ApplyDependencies(0);
2637 // Construct the staging ClusterSet.
2638 m_staging_clusterset.emplace();
2639 // Copy statistics, precomputed data, and to-be-applied dependencies (only if oversized) to
2640 // the new graph. To-be-applied removals will always be empty at this point.
2641 m_staging_clusterset->m_txcount = m_main_clusterset.m_txcount;
2642 m_staging_clusterset->m_txcount_oversized = m_main_clusterset.m_txcount_oversized;
2643 m_staging_clusterset->m_deps_to_add = m_main_clusterset.m_deps_to_add;
2644 m_staging_clusterset->m_group_data = m_main_clusterset.m_group_data;
2645 m_staging_clusterset->m_oversized = m_main_clusterset.m_oversized;
2646 Assume(m_staging_clusterset->m_oversized.has_value());
2647 m_staging_clusterset->m_cluster_usage = 0;
2648}
2649
2650void TxGraphImpl::AbortStaging() noexcept
2651{

Callers 3

ChangeSetMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
FUZZ_TARGETFunction · 0.80

Calls 2

emplaceMethod · 0.80
has_valueMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGETFunction · 0.64