Add interop chain spec and rename chain_id

This commit is contained in:
Age Manning
2019-07-24 21:31:49 +10:00
parent 88e89f9ab2
commit 40c0b70b22
11 changed files with 83 additions and 19 deletions

View File

@@ -136,6 +136,7 @@ fn main() {
.help("Listen port for the HTTP server.")
.takes_value(true),
)
/* Client related arguments */
.arg(
Arg::with_name("api")
.long("api")
@@ -182,7 +183,7 @@ fn main() {
from disk. A spec will be written to disk after this flag is used, so it is
primarily used for creating eth2 spec files.")
.takes_value(true)
.possible_values(&["mainnet", "minimal"])
.possible_values(&["mainnet", "minimal", "interop"])
.default_value("minimal"),
)
.arg(

View File

@@ -13,7 +13,7 @@ use tokio::runtime::Builder;
use tokio::runtime::Runtime;
use tokio::runtime::TaskExecutor;
use tokio_timer::clock::Clock;
use types::{MainnetEthSpec, MinimalEthSpec};
use types::{InteropEthSpec, MainnetEthSpec, MinimalEthSpec};
/// Reads the configuration and initializes a `BeaconChain` with the required types and parameters.
///
@@ -90,6 +90,22 @@ pub fn run_beacon_node(
runtime,
log,
),
("disk", "interop") => run::<ClientType<DiskStore, InteropEthSpec>>(
&db_path,
client_config,
eth2_config,
executor,
runtime,
log,
),
("memory", "interop") => run::<ClientType<MemoryStore, InteropEthSpec>>(
&db_path,
client_config,
eth2_config,
executor,
runtime,
log,
),
(db_type, spec) => {
error!(log, "Unknown runtime configuration"; "spec_constants" => spec, "db_type" => db_type);
Err("Unknown specification and/or db_type.".into())