Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fragment chain test might not use proper candidates list #5617

Closed
kamilsa opened this issue Sep 6, 2024 · 1 comment · Fixed by #5880
Closed

Fragment chain test might not use proper candidates list #5617

kamilsa opened this issue Sep 6, 2024 · 1 comment · Fixed by #5880
Assignees
Labels
I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@kamilsa
Copy link

kamilsa commented Sep 6, 2024

// Now back all candidates. Back them in a random order. The result should always be the same.
let mut candidates_shuffled = candidates.clone();
candidates_shuffled.shuffle(&mut thread_rng());
for candidate in candidates.iter() {
chain.candidate_backed(candidate);
storage.mark_backed(candidate);
}

It is observed that in the given snippet of code used in the test of fragment chains functionality a shuffled list of candidates is created but is never actually used below in the test.

Please check if this test works properly (cc @alindima @iceseer)

@github-actions github-actions bot added the I10-unconfirmed Issue might be valid, but it's not yet known. label Sep 6, 2024
@alindima
Copy link
Contributor

good catch, thanks! indeed, I missed using the shuffled candidates list. I fixed this locally and the test passes. I'll fix it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants