clusterlin: drop support for improvable chunking (simplification)

With MergeLinearizations() gone and the LIMO-based Linearize() replaced by SFL, we do not
need a class (LinearizationChunking) that can maintain an incrementally-improving chunk
set anymore.

Replace it with a function (ChunkLinearizationInfo) that just computes the chunks as
SetInfos once, and returns them as a vector. This simplifies several call sites too.
This commit is contained in:
Pieter Wuille
2025-10-12 09:48:19 -04:00
parent 91399a7912
commit 75bdb925f4
4 changed files with 51 additions and 268 deletions

View File

@@ -1230,10 +1230,9 @@ FUZZ_TARGET(txgraph)
// Construct a chunking object for the simulated graph, using the reported cluster
// linearization as ordering, and compare it against the reported chunk feerates.
if (sims.size() == 1 || level == TxGraph::Level::MAIN) {
cluster_linearize::LinearizationChunking simlinchunk(sim.graph, simlin);
auto simlinchunk = ChunkLinearizationInfo(sim.graph, simlin);
DepGraphIndex idx{0};
for (unsigned chunknum = 0; chunknum < simlinchunk.NumChunksLeft(); ++chunknum) {
auto chunk = simlinchunk.GetChunk(chunknum);
for (auto& chunk : simlinchunk) {
// Require that the chunks of cluster linearizations are connected (this must
// be the case as all linearizations inside are PostLinearized).
assert(sim.graph.IsConnected(chunk.transactions));