mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-20 04:30:31 +01:00
Trim internally builds an approximate dependency graph of the merged cluster, replacing all existing dependencies within existing clusters with a simple linear chain of dependencies. This helps keep the complexity of the merging operation down, but may result in cycles to appear in the general case, even though in real scenarios (where Trim is called for stitching re-added mempool transactions after a reorg back to the existing mempool transactions) such cycles are not possible. Add a test that specifically targets Trim() but in scenarios where it is guaranteed not to have any cycles. It is a special case, is much more a whitebox test than a blackbox test, and relies on randomness rather than fuzz input. The upside is that somewhat stronger properties can be tested. Co-authored-by: Greg Sanders <gsanders87@gmail.com>
60 KiB
60 KiB