Ethereum classic (#1706)

* Add Ethereum Classic support

(Rename homestead-dogmatic -> classic)

* Additional change needed.

* More needed changes.

* Separate database path for known forks.

* Address minor grumble.
This commit is contained in:
Gav Wood
2016-07-25 10:20:22 +02:00
committed by GitHub
parent 8574bfd546
commit e734810293
8 changed files with 20 additions and 14 deletions

View File

@@ -58,6 +58,8 @@ pub struct Spec {
pub name: String,
/// What engine are we using for this?
pub engine: Box<Engine>,
/// The fork identifier for this chain. Only needed to distinguish two chains sharing the same genesis.
pub fork_name: Option<String>,
/// Known nodes on the network in enode format.
pub nodes: Vec<String>,
@@ -105,6 +107,7 @@ impl From<ethjson::spec::Spec> for Spec {
name: s.name.into(),
params: params.clone(),
engine: Spec::engine(s.engine, params, builtins),
fork_name: s.fork_name.map(Into::into),
nodes: s.nodes.unwrap_or_else(Vec::new),
parent_hash: g.parent_hash,
transactions_root: g.transactions_root,
@@ -118,7 +121,7 @@ impl From<ethjson::spec::Spec> for Spec {
seal_fields: seal.fields,
seal_rlp: seal.rlp,
state_root_memo: RwLock::new(g.state_root),
genesis_state: From::from(s.accounts)
genesis_state: From::from(s.accounts),
}
}
}