mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
fuzz: Fix variable in clusterlin_postlinearize_tree check
The test intends to verify that running `PostLinearize` a second time on a tree-structured graph doesn't change the result. But `PostLinearize` was being called on the original variable, not the copy. So the check was comparing the unmodified copy against itself, which is useless. Fix by post-linearizing the correct variable.
This commit is contained in:
@@ -1309,8 +1309,8 @@ FUZZ_TARGET(clusterlin_postlinearize_tree)
|
||||
// Verify that post-linearizing again does not change the diagram. The result must be identical
|
||||
// as post_linearization ought to be optimal already with a tree-structured graph.
|
||||
auto post_post_linearization = post_linearization;
|
||||
PostLinearize(depgraph_tree, post_linearization);
|
||||
SanityCheck(depgraph_tree, post_linearization);
|
||||
PostLinearize(depgraph_tree, post_post_linearization);
|
||||
SanityCheck(depgraph_tree, post_post_linearization);
|
||||
auto post_post_chunking = ChunkLinearization(depgraph_tree, post_post_linearization);
|
||||
auto cmp_post = CompareChunks(post_post_chunking, post_chunking);
|
||||
assert(cmp_post == 0);
|
||||
|
||||
Reference in New Issue
Block a user