mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 20:57:10 +00:00
Many fixes
This commit is contained in:
@@ -33,9 +33,9 @@ use std::time::Duration;
|
||||
use types::{
|
||||
Attestation, AttestationRef, AttesterSlashing, AttesterSlashingRef, BeaconBlock, BeaconState,
|
||||
BlobSidecar, BlobsList, BlockImportSource, Checkpoint, DataColumnSidecar,
|
||||
DataColumnSidecarList, DataColumnSubnetId, ExecutionBlockHash, Hash256, IndexedAttestation,
|
||||
KzgProof, ProposerPreparationData, SignedBeaconBlock, SignedExecutionPayloadEnvelope, Slot,
|
||||
Uint256,
|
||||
DataColumnSidecarList, DataColumnSubnetId, ExecutionBlockHash, ForkVersionDecode, Hash256,
|
||||
IndexedAttestation, KzgProof, ProposerPreparationData, SignedBeaconBlock,
|
||||
SignedExecutionPayloadEnvelope, Slot, Uint256,
|
||||
};
|
||||
|
||||
// When set to true, cache any states fetched from the db.
|
||||
@@ -294,8 +294,12 @@ impl<E: EthSpec> LoadCase for ForkChoiceTest<E> {
|
||||
execution_payload,
|
||||
valid,
|
||||
} => {
|
||||
let envelope =
|
||||
ssz_decode_file(&path.join(format!("{execution_payload}.ssz_snappy")))?;
|
||||
let envelope = ssz_decode_file_with(
|
||||
&path.join(format!("{execution_payload}.ssz_snappy")),
|
||||
|bytes| {
|
||||
SignedExecutionPayloadEnvelope::from_ssz_bytes_by_fork(bytes, fork_name)
|
||||
},
|
||||
)?;
|
||||
Ok(Step::OnExecutionPayload {
|
||||
execution_payload: envelope,
|
||||
valid,
|
||||
@@ -990,8 +994,8 @@ impl<E: EthSpec> Tester<E> {
|
||||
signed_envelope: &SignedExecutionPayloadEnvelope<E>,
|
||||
valid: bool,
|
||||
) -> Result<(), Error> {
|
||||
let block_root = signed_envelope.message.beacon_block_root;
|
||||
let block_hash = signed_envelope.message.payload.block_hash;
|
||||
let block_root = signed_envelope.message().beacon_block_root();
|
||||
let block_hash = signed_envelope.message().payload().block_hash();
|
||||
let store = &self.harness.chain.store;
|
||||
let spec = &self.harness.chain.spec;
|
||||
|
||||
|
||||
@@ -496,8 +496,10 @@ impl<E: EthSpec> Operation<E> for SignedExecutionPayloadEnvelope<E> {
|
||||
false
|
||||
}
|
||||
|
||||
fn decode(path: &Path, _: ForkName, _spec: &ChainSpec) -> Result<Self, Error> {
|
||||
ssz_decode_file(path)
|
||||
fn decode(path: &Path, fork_name: ForkName, _spec: &ChainSpec) -> Result<Self, Error> {
|
||||
ssz_decode_file_with(path, |bytes| {
|
||||
SignedExecutionPayloadEnvelope::from_ssz_bytes_by_fork(bytes, fork_name)
|
||||
})
|
||||
}
|
||||
|
||||
fn apply_to(
|
||||
|
||||
@@ -92,7 +92,6 @@ type_name_generic!(ExecutionPayloadHeaderCapella, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadHeaderDeneb, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadHeaderElectra, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadHeaderFulu, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadHeaderHeze, "ExecutionPayloadHeader");
|
||||
type_name_generic!(ExecutionPayloadBid);
|
||||
type_name_generic!(SignedExecutionPayloadBidGloas, "SignedExecutionPayloadBid");
|
||||
type_name_generic!(ExecutionRequests);
|
||||
|
||||
Reference in New Issue
Block a user