| 164 | } |
| 165 | |
| 166 | std::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. |
no test coverage detected