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

Method AddDependency

src/test/fuzz/txgraph.cpp:166–177  ·  view source on GitHub ↗

Add a dependency between two positions in this graph. */

Source from the content-addressed store, hash-verified

164
165 /** Add a dependency between two positions in this graph. */
166 void AddDependency(TxGraph::Ref* parent, TxGraph::Ref* child)
167 {
168 auto par_pos = Find(parent);
169 if (par_pos == MISSING) return;
170 auto chl_pos = Find(child);
171 if (chl_pos == MISSING) return;
172 graph.AddDependencies(SetType::Singleton(par_pos), chl_pos);
173 MakeModified(par_pos);
174 real_is_optimal = false;
175 // This may invalidate our cached oversized value.
176 if (oversized.has_value() && !*oversized) oversized = std::nullopt;
177 }
178
179 /** Modify the transaction fee of a ref, if it exists. */
180 void SetTransactionFee(TxGraph::Ref* ref, int64_t fee)

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.45
FUZZ_TARGETFunction · 0.45
BenchTxGraphTrimFunction · 0.45

Calls 3

FindFunction · 0.85
AddDependenciesMethod · 0.45
has_valueMethod · 0.45

Tested by

no test coverage detected