Correct naming and fix for Morden.
This commit is contained in:
parent
957dd36328
commit
e369042ff7
13
src/spec.rs
13
src/spec.rs
@ -194,6 +194,7 @@ impl Spec {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the builtins map for the standard network of Ethereum Olympic, Frontier and Homestead.
|
||||||
fn standard_builtins() -> HashMap<Address, Builtin> {
|
fn standard_builtins() -> HashMap<Address, Builtin> {
|
||||||
let mut ret = HashMap::new();
|
let mut ret = HashMap::new();
|
||||||
ret.insert(Address::from_str("0000000000000000000000000000000000000001").unwrap(), Builtin::from_named_linear("ecrecover", 3000, 0).unwrap());
|
ret.insert(Address::from_str("0000000000000000000000000000000000000001").unwrap(), Builtin::from_named_linear("ecrecover", 3000, 0).unwrap());
|
||||||
@ -204,7 +205,7 @@ impl Spec {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Creates the Olympic network chain spec.
|
/// Creates the Olympic network chain spec.
|
||||||
pub fn olympic() -> Spec {
|
pub fn new_like_olympic() -> Spec {
|
||||||
Spec {
|
Spec {
|
||||||
engine_name: "Ethash".to_string(),
|
engine_name: "Ethash".to_string(),
|
||||||
engine_params: vec![
|
engine_params: vec![
|
||||||
@ -241,8 +242,8 @@ impl Spec {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates the Frontier network chain spec.
|
/// Creates the Frontier network chain spec, except for the genesis state, which is blank.
|
||||||
pub fn frontier() -> Spec {
|
pub fn new_like_frontier() -> Spec {
|
||||||
Spec {
|
Spec {
|
||||||
engine_name: "Ethash".to_string(),
|
engine_name: "Ethash".to_string(),
|
||||||
engine_params: vec![
|
engine_params: vec![
|
||||||
@ -280,7 +281,7 @@ impl Spec {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Creates the Morden network chain spec.
|
/// Creates the Morden network chain spec.
|
||||||
pub fn morden() -> Spec {
|
pub fn new_morden() -> Spec {
|
||||||
Spec {
|
Spec {
|
||||||
engine_name: "Ethash".to_string(),
|
engine_name: "Ethash".to_string(),
|
||||||
engine_params: vec![
|
engine_params: vec![
|
||||||
@ -305,8 +306,8 @@ impl Spec {
|
|||||||
gas_used: U256::from(0u64),
|
gas_used: U256::from(0u64),
|
||||||
timestamp: U256::from(0u64),
|
timestamp: U256::from(0u64),
|
||||||
extra_data: vec![],
|
extra_data: vec![],
|
||||||
genesis_state: vec![ // TODO: make correct
|
genesis_state: vec![
|
||||||
(Address::new(), Account::new_basic(U256::from(1) << 200, U256::from(0)))
|
(Address::from_str("102e61f5d8f9bc71d0ad4a084df4e65e05ce0e1c").unwrap(), Account::new_basic(U256::from(1) << 200, U256::from(0)))
|
||||||
].into_iter().fold(HashMap::new(), | mut acc, vec | {
|
].into_iter().fold(HashMap::new(), | mut acc, vec | {
|
||||||
acc.insert(vec.0, vec.1);
|
acc.insert(vec.0, vec.1);
|
||||||
acc
|
acc
|
||||||
|
Loading…
Reference in New Issue
Block a user