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

Method IsOversized

src/test/fuzz/txgraph.cpp:100–113  ·  view source on GitHub ↗

Check whether this graph is oversized (contains a connected component whose number of * transactions exceeds max_cluster_count. */

Source from the content-addressed store, hash-verified

98 /** Check whether this graph is oversized (contains a connected component whose number of
99 * transactions exceeds max_cluster_count. */
100 bool IsOversized()
101 {
102 if (!oversized.has_value()) {
103 // Only recompute when oversized isn't already known.
104 oversized = false;
105 for (auto component : GetComponents()) {
106 if (component.Count() > max_cluster_count) oversized = true;
107 uint64_t component_size{0};
108 for (auto i : component) component_size += graph.FeeRate(i).size;
109 if (component_size > max_cluster_size) oversized = true;
110 }
111 }
112 return *oversized;
113 }
114
115 void MakeModified(DepGraphIndex index)
116 {

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.45
FUZZ_TARGETFunction · 0.45
BenchTxGraphTrimFunction · 0.45

Calls 3

FeeRateMethod · 0.80
has_valueMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected