Beacon state diffs!

This commit is contained in:
Michael Sproul
2022-02-24 08:46:03 +11:00
parent 0a4dcdd4e3
commit 143cf59504
38 changed files with 860 additions and 277 deletions

View File

@@ -5,14 +5,17 @@ use crate::decode::{ssz_decode_file, ssz_decode_file_with, ssz_decode_state, yam
use crate::testing_spec;
use crate::type_name::TypeName;
use serde_derive::Deserialize;
use state_processing::per_block_processing::{
errors::BlockProcessingError,
process_block_header, process_execution_payload,
process_operations::{
altair, base, process_attester_slashings, process_deposits, process_exits,
process_proposer_slashings,
use state_processing::{
per_block_processing::{
errors::BlockProcessingError,
process_block_header, process_execution_payload,
process_operations::{
altair, base, process_attester_slashings, process_deposits, process_exits,
process_proposer_slashings,
},
process_sync_aggregate, VerifyBlockRoot, VerifySignatures,
},
process_sync_aggregate, VerifyBlockRoot, VerifySignatures,
ConsensusContext,
};
use std::fmt::Debug;
use std::path::Path;
@@ -183,7 +186,8 @@ impl<E: EthSpec> Operation<E> for BeaconBlock<E> {
spec: &ChainSpec,
_: &Operations<E, Self>,
) -> Result<(), BlockProcessingError> {
process_block_header(state, self.to_ref(), VerifyBlockRoot::True, spec)?;
let mut ctxt = ConsensusContext::new(state.slot());
process_block_header(state, self.to_ref(), VerifyBlockRoot::True, &mut ctxt, spec)?;
Ok(())
}
}