txgraph: track amount of work done in linearization (preparation)

This commit is contained in:
Pieter Wuille
2025-04-13 11:09:04 -04:00
parent 6ba316eaa0
commit cfe9958852
4 changed files with 16 additions and 13 deletions

View File

@@ -229,8 +229,8 @@ void BenchLinearizeOptimally(benchmark::Bench& bench, const std::array<uint8_t,
reader >> Using<DepGraphFormatter>(depgraph);
uint64_t rng_seed = 0;
bench.run([&] {
auto res = Linearize(depgraph, /*max_iterations=*/10000000, rng_seed++);
assert(res.second);
auto [_lin, optimal, _cost] = Linearize(depgraph, /*max_iterations=*/10000000, rng_seed++);
assert(optimal);
});
};