mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 03:42:46 +00:00
Fixes to make EF Capella tests pass (#3719)
* Fixes to make EF Capella tests pass * Clippy for state_processing
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
use super::*;
|
||||
use crate::case_result::compare_beacon_state_results_without_caches;
|
||||
use crate::decode::{ssz_decode_file, ssz_decode_state, yaml_decode_file};
|
||||
use crate::decode::{ssz_decode_file, ssz_decode_file_with, ssz_decode_state, yaml_decode_file};
|
||||
use serde_derive::Deserialize;
|
||||
use state_processing::initialize_beacon_state_from_eth1;
|
||||
use std::path::PathBuf;
|
||||
use types::{
|
||||
BeaconState, Deposit, EthSpec, ExecutionPayloadHeader, ExecutionPayloadHeaderMerge, ForkName,
|
||||
Hash256,
|
||||
};
|
||||
use types::{BeaconState, Deposit, EthSpec, ExecutionPayloadHeader, ForkName, Hash256};
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
struct Metadata {
|
||||
@@ -41,14 +38,10 @@ impl<E: EthSpec> LoadCase for GenesisInitialization<E> {
|
||||
let meta: Metadata = yaml_decode_file(&path.join("meta.yaml"))?;
|
||||
let execution_payload_header: Option<ExecutionPayloadHeader<E>> =
|
||||
if meta.execution_payload_header.unwrap_or(false) {
|
||||
//FIXME(sean) we could decode based on timestamp - we probably don't do decode a payload
|
||||
// without a block this elsewhere at presetn. But when we support SSZ in the builder api we may need to.
|
||||
// Although that API should include fork info. Hardcoding this for now
|
||||
Some(ExecutionPayloadHeader::Merge(ssz_decode_file::<
|
||||
ExecutionPayloadHeaderMerge<E>,
|
||||
>(
|
||||
Some(ssz_decode_file_with(
|
||||
&path.join("execution_payload_header.ssz_snappy"),
|
||||
)?))
|
||||
|bytes| ExecutionPayloadHeader::from_ssz_bytes(bytes, fork_name),
|
||||
)?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user