| 174 | } |
| 175 | |
| 176 | CTxMemPool::CTxMemPool(Options opts, bilingual_str& error) |
| 177 | : m_opts{Flatten(std::move(opts), error)} |
| 178 | { |
| 179 | m_txgraph = MakeTxGraph( |
| 180 | /*max_cluster_count=*/m_opts.limits.cluster_count, |
| 181 | /*max_cluster_size=*/m_opts.limits.cluster_size_vbytes * WITNESS_SCALE_FACTOR, |
| 182 | /*acceptable_cost=*/ACCEPTABLE_COST, |
| 183 | /*fallback_order=*/[&](const TxGraph::Ref& a, const TxGraph::Ref& b) noexcept { |
| 184 | const Txid& txid_a = static_cast<const CTxMemPoolEntry&>(a).GetTx().GetHash(); |
| 185 | const Txid& txid_b = static_cast<const CTxMemPoolEntry&>(b).GetTx().GetHash(); |
| 186 | return txid_a <=> txid_b; |
| 187 | }); |
| 188 | } |
| 189 | |
| 190 | bool CTxMemPool::isSpent(const COutPoint& outpoint) const |
| 191 | { |
nothing calls this directly
no test coverage detected