Change genesis fork for testnets (#750)

* Change genesis fork for testnets

* Fix genesis fork in lcli
This commit is contained in:
Paul Hauner
2020-01-06 17:30:08 +11:00
committed by GitHub
parent 2dddbed7ce
commit b0c8b2b700
3 changed files with 22 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ use eth2_testnet_config::Eth2TestnetConfig;
use std::fs::File;
use std::io::Read;
use std::path::PathBuf;
use types::{ChainSpec, EthSpec, YamlConfig};
use types::{ChainSpec, Epoch, EthSpec, Fork, YamlConfig};
use web3::{transports::Http, Web3};
pub const SECONDS_PER_ETH1_BLOCK: u64 = 15;
@@ -130,6 +130,12 @@ pub fn lighthouse_testnet_spec(mut spec: ChainSpec) -> ChainSpec {
// With a follow distance of 16, this is 40mins.
spec.seconds_per_day = SECONDS_PER_ETH1_BLOCK * spec.eth1_follow_distance * 2 * 5;
spec.genesis_fork = Fork {
previous_version: [0, 0, 0, 0],
current_version: [1, 3, 3, 7],
epoch: Epoch::new(0),
};
spec
}