txgraph: use enum Level instead of bool main_only

This commit is contained in:
Pieter Wuille
2025-09-09 15:54:33 -04:00
parent c0894a0a2b
commit d45f3717d2
5 changed files with 103 additions and 105 deletions

View File

@@ -114,9 +114,9 @@ void BenchTxGraphTrim(benchmark::Bench& bench)
graph->GetBlockBuilder();
});
assert(!graph->IsOversized());
assert(!graph->IsOversized(TxGraph::Level::TOP));
// At least 99% of chains must survive.
assert(graph->GetTransactionCount() >= (NUM_TOP_CHAINS * NUM_TX_PER_TOP_CHAIN * 99) / 100);
assert(graph->GetTransactionCount(TxGraph::Level::TOP) >= (NUM_TOP_CHAINS * NUM_TX_PER_TOP_CHAIN * 99) / 100);
}
} // namespace