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

Function MakeEphemeralMempool

src/test/fuzz/package_eval.cpp:166–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166std::unique_ptr<CTxMemPool> MakeEphemeralMempool(const NodeContext& node)
167{
168 // Take the default options for tests...
169 CTxMemPool::Options mempool_opts{MemPoolOptionsForTest(node)};
170
171 mempool_opts.check_ratio = 1;
172
173 // Require standardness rules otherwise ephemeral dust is no-op
174 mempool_opts.require_standard = true;
175
176 // And set minrelay to 0 to allow ephemeral parent tx even with non-TRUC
177 mempool_opts.min_relay_feerate = CFeeRate(0);
178
179 bilingual_str error;
180 // ...and construct a CTxMemPool from it
181 auto mempool{std::make_unique<CTxMemPool>(std::move(mempool_opts), error)};
182 Assert(error.empty());
183 return mempool;
184}
185
186// Scan mempool for a tx that has spent dust and return a
187// prevout of the child that isn't the dusty parent itself.

Callers 1

package_eval.cppFile · 0.85

Calls 3

MemPoolOptionsForTestFunction · 0.85
CFeeRateClass · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected