Merge branch 'master' into implement-shuffle
This commit is contained in:
commit
2affd305d9
@ -1,18 +1,20 @@
|
||||
use crate::{
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::{
|
||||
beacon_state::BeaconStateError, BeaconState, ChainSpec, Deposit, DepositData, DepositInput,
|
||||
Eth1Data, Hash256, Keypair,
|
||||
};
|
||||
use bls::create_proof_of_possession;
|
||||
};
|
||||
use bls::create_proof_of_possession;
|
||||
|
||||
struct BeaconStateTestBuilder {
|
||||
struct BeaconStateTestBuilder {
|
||||
pub genesis_time: u64,
|
||||
pub initial_validator_deposits: Vec<Deposit>,
|
||||
pub latest_eth1_data: Eth1Data,
|
||||
pub spec: ChainSpec,
|
||||
pub keypairs: Vec<Keypair>,
|
||||
}
|
||||
}
|
||||
|
||||
impl BeaconStateTestBuilder {
|
||||
impl BeaconStateTestBuilder {
|
||||
pub fn with_random_validators(validator_count: usize) -> Self {
|
||||
let genesis_time = 10_000_000;
|
||||
let keypairs: Vec<Keypair> = (0..validator_count)
|
||||
@ -59,11 +61,7 @@ impl BeaconStateTestBuilder {
|
||||
&self.spec,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn can_produce_genesis_block() {
|
||||
|
Loading…
Reference in New Issue
Block a user