| 229 | } |
| 230 | |
| 231 | void MiniMiner::SanityCheck() const |
| 232 | { |
| 233 | // m_entries, m_entries_by_txid, and m_descendant_set_by_txid all same size |
| 234 | Assume(m_entries.size() == m_entries_by_txid.size()); |
| 235 | Assume(m_entries.size() == m_descendant_set_by_txid.size()); |
| 236 | // Cached ancestor values should be at least as large as the transaction's own size |
| 237 | Assume(std::all_of(m_entries.begin(), m_entries.end(), [](const auto& entry) { |
| 238 | return entry->second.GetSizeWithAncestors() >= entry->second.GetTxSize();})); |
| 239 | // None of the entries should be to-be-replaced transactions |
| 240 | Assume(std::all_of(m_to_be_replaced.begin(), m_to_be_replaced.end(), |
| 241 | [&](const auto& txid){ return !m_entries_by_txid.contains(txid); })); |
| 242 | } |
| 243 | |
| 244 | void MiniMiner::BuildMockTemplate(std::optional<CFeeRate> target_feerate) |
| 245 | { |