mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 22:04:44 +00:00
Allow for customizable recent genesis window
This commit is contained in:
@@ -42,7 +42,10 @@ pub enum BeaconChainStartMethod {
|
||||
/// Create a new beacon chain that can connect to mainnet.
|
||||
///
|
||||
/// Set the genesis time to be the start of the previous 30-minute window.
|
||||
RecentGenesis { validator_count: usize },
|
||||
RecentGenesis {
|
||||
validator_count: usize,
|
||||
minutes: u64,
|
||||
},
|
||||
/// Create a new beacon chain with `genesis_time` and `validator_count` validators, all with well-known
|
||||
/// secret keys.
|
||||
Generated {
|
||||
|
||||
@@ -88,9 +88,15 @@ where
|
||||
crit!(log, "No mainnet beacon chain startup specification.");
|
||||
return Err("Mainnet is not yet specified. We're working on it.".into());
|
||||
}
|
||||
BeaconChainStartMethod::RecentGenesis { validator_count } => {
|
||||
BeaconChainBuilder::recent_genesis(*validator_count, spec.clone(), log.clone())
|
||||
}
|
||||
BeaconChainStartMethod::RecentGenesis {
|
||||
validator_count,
|
||||
minutes,
|
||||
} => BeaconChainBuilder::recent_genesis(
|
||||
*validator_count,
|
||||
*minutes,
|
||||
spec.clone(),
|
||||
log.clone(),
|
||||
),
|
||||
BeaconChainStartMethod::Generated {
|
||||
validator_count,
|
||||
genesis_time,
|
||||
|
||||
Reference in New Issue
Block a user