mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 05:44:44 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
This commit is contained in:
@@ -23,7 +23,7 @@ pub fn run<T: EthSpec>(matches: &ArgMatches) -> Result<(), String> {
|
||||
base_fee_per_gas,
|
||||
timestamp: genesis_time,
|
||||
block_hash: eth1_block_hash,
|
||||
random: eth1_block_hash.into_root(),
|
||||
prev_randao: eth1_block_hash.into_root(),
|
||||
..ExecutionPayloadHeader::default()
|
||||
};
|
||||
let mut file = File::create(file_name).map_err(|_| "Unable to create file".to_string())?;
|
||||
|
||||
@@ -4,7 +4,7 @@ use eth2::{BeaconNodeHttpClient, Timeouts};
|
||||
use log::{error, info};
|
||||
use sensitive_url::SensitiveUrl;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::fs::OpenOptions;
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
use std::time::Duration;
|
||||
@@ -158,7 +158,7 @@ pub async fn run<T: EthSpec>(matches: &ArgMatches<'_>) -> Result<(), String> {
|
||||
|
||||
let mut proposer_map: HashMap<Slot, ProposerInfo> = HashMap::new();
|
||||
|
||||
let mut file = OpenOptions::new()
|
||||
let mut file = File::options()
|
||||
.read(true)
|
||||
.write(true)
|
||||
.create(true)
|
||||
|
||||
@@ -41,10 +41,13 @@ pub fn run_parse_ssz<T: EthSpec>(matches: &ArgMatches) -> Result<(), String> {
|
||||
match type_str {
|
||||
"signed_block_base" => decode_and_print::<SignedBeaconBlockBase<T>>(&bytes, format)?,
|
||||
"signed_block_altair" => decode_and_print::<SignedBeaconBlockAltair<T>>(&bytes, format)?,
|
||||
"signed_block_merge" => decode_and_print::<SignedBeaconBlockMerge<T>>(&bytes, format)?,
|
||||
"block_base" => decode_and_print::<BeaconBlockBase<T>>(&bytes, format)?,
|
||||
"block_altair" => decode_and_print::<BeaconBlockAltair<T>>(&bytes, format)?,
|
||||
"block_merge" => decode_and_print::<BeaconBlockMerge<T>>(&bytes, format)?,
|
||||
"state_base" => decode_and_print::<BeaconStateBase<T>>(&bytes, format)?,
|
||||
"state_altair" => decode_and_print::<BeaconStateAltair<T>>(&bytes, format)?,
|
||||
"state_merge" => decode_and_print::<BeaconStateMerge<T>>(&bytes, format)?,
|
||||
other => return Err(format!("Unknown type: {}", other)),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user