mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-22 19:50:37 +00:00
Rename vec_shuffle
to fisher_yates_shuffle
We're adding another shuffler so it's nice to be specific
This commit is contained in:
parent
1f8efffd6d
commit
c41b743d2d
@ -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",
|
||||||
|
@ -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" }
|
||||||
|
@ -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,
|
||||||
|
@ -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"
|
Loading…
Reference in New Issue
Block a user