mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 21:38:31 +00:00
process_execution_envelope
This commit is contained in:
@@ -482,7 +482,7 @@ where
|
||||
)]
|
||||
#[metastruct(exclude_from(tree_lists))]
|
||||
pub latest_execution_payload_header: ExecutionPayloadHeaderElectra<E>,
|
||||
#[superstruct(only(EIP7732), partial_getter(rename = "latest_execution_bid_eip7732"))]
|
||||
#[superstruct(only(EIP7732))]
|
||||
#[metastruct(exclude_from(tree_lists))]
|
||||
pub latest_execution_bid: ExecutionBid,
|
||||
|
||||
@@ -1982,6 +1982,19 @@ impl<E: EthSpec> BeaconState<E> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_parent_block_full(&self) -> bool {
|
||||
match self {
|
||||
BeaconState::Base(_) | BeaconState::Altair(_) => false,
|
||||
BeaconState::Bellatrix(_)
|
||||
| BeaconState::Capella(_)
|
||||
| BeaconState::Deneb(_)
|
||||
| BeaconState::Electra(_) => true,
|
||||
BeaconState::EIP7732(state) => {
|
||||
state.latest_execution_bid.block_hash == state.latest_block_hash
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the committee cache for some `slot`.
|
||||
///
|
||||
/// Return an error if the cache for the slot's epoch is not initialized.
|
||||
|
||||
@@ -48,3 +48,5 @@ pub struct ExecutionEnvelope<E: EthSpec> {
|
||||
pub payment_withheld: bool,
|
||||
pub state_root: Hash256,
|
||||
}
|
||||
|
||||
impl<E: EthSpec> SignedRoot for ExecutionEnvelopeEIP7732<E> {}
|
||||
|
||||
Reference in New Issue
Block a user