local testnet config updates

This commit is contained in:
realbigsean
2022-12-06 08:54:46 -05:00
parent e72d9fb922
commit 2704955b2e
8 changed files with 20 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ use std::io::Read;
use std::path::PathBuf;
use std::str::FromStr;
use std::time::{SystemTime, UNIX_EPOCH};
use types::ExecutionBlockHash;
use types::{BeaconStateMerge, ExecutionBlockHash};
use types::{
test_utils::generate_deterministic_keypairs, Address, BeaconState, ChainSpec, Config, Eth1Data,
EthSpec, ExecutionPayloadHeader, ExecutionPayloadHeaderMerge, Hash256, Keypair, PublicKey,
@@ -141,10 +141,13 @@ pub fn run<T: EthSpec>(testnet_dir_path: PathBuf, matches: &ArgMatches) -> Resul
None
};
let mut merge_state : types::BeaconState<T>=BeaconState::Merge(BeaconStateMerge::from_ssz_bytes(genesis_state_bytes.unwrap().as_ref()).unwrap());
upgrade_to_capella(&mut merge_state, &spec).unwrap();
let testnet = Eth2NetworkConfig {
deposit_contract_deploy_block,
boot_enr: Some(vec![]),
genesis_state_bytes,
genesis_state_bytes: Some(merge_state.as_ssz_bytes()),
config: Config::from_chain_spec::<T>(&spec),
};