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

Remove dependency on rand's SliceRandom shuffle implementation in gossip-support #2555

Merged
merged 3 commits into from
Nov 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix test
  • Loading branch information
rphmeier committed Nov 30, 2023
commit 3a820fb9cb8cc484978ab30cd26bd9d7db732680
4 changes: 3 additions & 1 deletion polkadot/node/network/gossip-support/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,8 @@ quickcheck! {
let mut data1 = x.clone();
let mut data2 = x;

data1.shuffle(&mut rng1) == crate::fisher_yates_shuffle(&mut rng2, &mut data2[..])
data1.shuffle(&mut rng1);
crate::fisher_yates_shuffle(&mut rng2, &mut data2[..]);
data1 == data2
}
}