Ensure beacon node generates the right eth2 spec

This commit is contained in:
Paul Hauner
2019-06-08 17:53:22 -04:00
parent d8fc5f31d8
commit eb23b003b4
2 changed files with 85 additions and 23 deletions

View File

@@ -20,6 +20,22 @@ impl Default for Eth2Config {
}
}
impl Eth2Config {
pub fn mainnet() -> Self {
Self {
spec_constants: "mainnet".to_string(),
spec: ChainSpec::mainnet(),
}
}
pub fn minimal() -> Self {
Self {
spec_constants: "minimal".to_string(),
spec: ChainSpec::minimal(),
}
}
}
impl Eth2Config {
/// Apply the following arguments to `self`, replacing values if they are specified in `args`.
///