diff --git a/Cargo.toml b/Cargo.toml index a2c464366..7d545c885 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ members = [ "eth2/utils/honey-badger-split", "eth2/utils/slot_clock", "eth2/utils/ssz", - "eth2/utils/vec_shuffle", + "eth2/utils/fisher_yates_shuffle", "beacon_node", "beacon_node/db", "beacon_node/beacon_chain", diff --git a/eth2/types/Cargo.toml b/eth2/types/Cargo.toml index 24aabf148..9ae5d0090 100644 --- a/eth2/types/Cargo.toml +++ b/eth2/types/Cargo.toml @@ -18,4 +18,4 @@ serde_derive = "1.0" serde_json = "1.0" slog = "^2.2.3" ssz = { path = "../utils/ssz" } -vec_shuffle = { path = "../utils/vec_shuffle" } +fisher_yates_shuffle = { path = "../utils/fisher_yates_shuffle" } diff --git a/eth2/types/src/beacon_state.rs b/eth2/types/src/beacon_state.rs index ed53bfea9..a0f8c5e2c 100644 --- a/eth2/types/src/beacon_state.rs +++ b/eth2/types/src/beacon_state.rs @@ -5,12 +5,12 @@ use crate::{ PendingAttestation, PublicKey, Signature, Slot, Validator, }; use bls::verify_proof_of_possession; +use fisher_yates_shuffle::shuffle; use honey_badger_split::SplitExt; use rand::RngCore; use serde_derive::Serialize; use ssz::{hash, Decodable, DecodeError, Encodable, SszStream, TreeHash}; use std::ops::Range; -use vec_shuffle::shuffle; pub enum Error { InsufficientValidators, diff --git a/eth2/utils/vec_shuffle/Cargo.toml b/eth2/utils/fisher_yates_shuffle/Cargo.toml similarity index 85% rename from eth2/utils/vec_shuffle/Cargo.toml rename to eth2/utils/fisher_yates_shuffle/Cargo.toml index aaeb50074..7d33c2e91 100644 --- a/eth2/utils/vec_shuffle/Cargo.toml +++ b/eth2/utils/fisher_yates_shuffle/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "vec_shuffle" +name = "fisher_yates_shuffle" version = "0.1.0" authors = ["Paul Hauner "] edition = "2018" diff --git a/eth2/utils/vec_shuffle/src/lib.rs b/eth2/utils/fisher_yates_shuffle/src/lib.rs similarity index 100% rename from eth2/utils/vec_shuffle/src/lib.rs rename to eth2/utils/fisher_yates_shuffle/src/lib.rs diff --git a/eth2/utils/vec_shuffle/src/rng.rs b/eth2/utils/fisher_yates_shuffle/src/rng.rs similarity index 100% rename from eth2/utils/vec_shuffle/src/rng.rs rename to eth2/utils/fisher_yates_shuffle/src/rng.rs diff --git a/eth2/utils/vec_shuffle/src/specs/shuffle_test_vectors.yaml b/eth2/utils/fisher_yates_shuffle/src/specs/shuffle_test_vectors.yaml similarity index 100% rename from eth2/utils/vec_shuffle/src/specs/shuffle_test_vectors.yaml rename to eth2/utils/fisher_yates_shuffle/src/specs/shuffle_test_vectors.yaml