mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2025-01-04 02:04:28 +00:00
Merge branch 'tidy-beacon-state' into test-harness-fix
This commit is contained in:
commit
b05f12cf6f
@ -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