clusterlin: minimize chunks (feature)

After the normal optimization process finishes, and finds an optimal
spanning forest, run a second process (while computation budget remains)
to split chunks into minimal equal-feerate chunks.
This commit is contained in:
Pieter Wuille
2025-10-14 16:15:19 -04:00
parent abc6a3a4eb
commit da56ef239b
5 changed files with 235 additions and 29 deletions

View File

@@ -94,10 +94,8 @@ void TestOptimalLinearization(const std::vector<uint8_t>& enc, const std::vector
SanityCheck(depgraph, lin);
auto chunking = ChunkLinearization(depgraph, lin);
BOOST_CHECK(std::is_eq(CompareChunks(chunking, optimal_diagram)));
// TODO: temporarily disabled; SFL does not guarantee minimal chunks. This will be
// reinstated in a future commit.
// // Verify that the chunks are minimal.
// BOOST_CHECK(chunking.size() == optimal_diagram.size());
// Verify that the chunks are minimal.
BOOST_CHECK_EQUAL(chunking.size(), optimal_diagram.size());
}
tx_count = depgraph.PositionRange();
};