Rename vec_shuffle to fisher_yates_shuffle

We're adding another shuffler so it's nice to be specific
This commit is contained in:
Paul Hauner 2019-02-14 14:57:29 +11:00
parent 1f8efffd6d
commit c41b743d2d
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6
7 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ members = [
"eth2/utils/honey-badger-split", "eth2/utils/honey-badger-split",
"eth2/utils/slot_clock", "eth2/utils/slot_clock",
"eth2/utils/ssz", "eth2/utils/ssz",
"eth2/utils/vec_shuffle", "eth2/utils/fisher_yates_shuffle",
"beacon_node", "beacon_node",
"beacon_node/db", "beacon_node/db",
"beacon_node/beacon_chain", "beacon_node/beacon_chain",

View File

@ -18,4 +18,4 @@ serde_derive = "1.0"
serde_json = "1.0" serde_json = "1.0"
slog = "^2.2.3" slog = "^2.2.3"
ssz = { path = "../utils/ssz" } ssz = { path = "../utils/ssz" }
vec_shuffle = { path = "../utils/vec_shuffle" } fisher_yates_shuffle = { path = "../utils/fisher_yates_shuffle" }

View File

@ -5,12 +5,12 @@ use crate::{
PendingAttestation, PublicKey, Signature, Slot, Validator, PendingAttestation, PublicKey, Signature, Slot, Validator,
}; };
use bls::verify_proof_of_possession; use bls::verify_proof_of_possession;
use fisher_yates_shuffle::shuffle;
use honey_badger_split::SplitExt; use honey_badger_split::SplitExt;
use rand::RngCore; use rand::RngCore;
use serde_derive::Serialize; use serde_derive::Serialize;
use ssz::{hash, Decodable, DecodeError, Encodable, SszStream, TreeHash}; use ssz::{hash, Decodable, DecodeError, Encodable, SszStream, TreeHash};
use std::ops::Range; use std::ops::Range;
use vec_shuffle::shuffle;
pub enum Error { pub enum Error {
InsufficientValidators, InsufficientValidators,

View File

@ -1,5 +1,5 @@
[package] [package]
name = "vec_shuffle" name = "fisher_yates_shuffle"
version = "0.1.0" version = "0.1.0"
authors = ["Paul Hauner <paul@paulhauner.com>"] authors = ["Paul Hauner <paul@paulhauner.com>"]
edition = "2018" edition = "2018"