clusterlin: replace cluster linearization with SFL (feature)

This replaces the existing LIMO linearization algorithm (which internally uses
ancestor set finding and candidate set finding) with the much more performant
spanning-forest linearization algorithm.

This removes the old candidate-set search algorithm, and several of its tests,
benchmarks, and needed utility code.

The worst case time per cost is similar to the previous algorithm, so
ACCEPTABLE_ITERS is unchanged.
This commit is contained in:
Pieter Wuille
2025-10-23 19:15:21 -04:00
parent 6a8fa821b8
commit 3efc94d656
7 changed files with 81 additions and 994 deletions

View File

@@ -239,8 +239,9 @@ class MempoolPackagesTest(BitcoinTestFramework):
self.generate(self.nodes[0], 1)
self.trigger_reorg(fork_blocks, self.nodes[0])
# Check if the txs are returned to the mempool
assert_equal(self.nodes[0].getrawmempool(), mempool0)
# Check if the txs are returned to the mempool (though the transaction ordering may
# change as it is non-deterministic).
assert_equal(set(self.nodes[0].getrawmempool()), set(mempool0))
# Clean-up the mempool
self.generate(self.nodes[0], 1)