mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
Emit correct beacon IL event
This commit is contained in:
@@ -75,7 +75,9 @@ use crate::{
|
||||
kzg_utils, metrics, AvailabilityPendingExecutedBlock, BeaconChainError, BeaconForkChoiceStore,
|
||||
BeaconSnapshot, CachedHead,
|
||||
};
|
||||
use eth2::types::{EventKind, SseBlobSidecar, SseBlock, SseExtendedPayloadAttributes};
|
||||
use eth2::types::{
|
||||
EventKind, SseBlobSidecar, SseBlock, SseExtendedPayloadAttributes, SseInclusionList,
|
||||
};
|
||||
use execution_layer::{
|
||||
BlockProposalContents, BlockProposalContentsType, BuilderParams, ChainHealth, ExecutionLayer,
|
||||
FailedCondition, PayloadAttributes, PayloadStatus,
|
||||
@@ -2395,7 +2397,10 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
GossipVerifiedInclusionList::verify(inclusion_list, self).inspect(|v| {
|
||||
metrics::inc_counter(&metrics::INCLUSION_LIST_PROCESSING_SUCCESSES);
|
||||
if let Some(event_handler) = self.event_handler.as_ref() {
|
||||
event_handler.register(EventKind::InclusionList(Box::new(v.signed_il.clone())));
|
||||
event_handler.register(EventKind::InclusionList(SseInclusionList {
|
||||
version: ForkName::Eip7805,
|
||||
data: v.signed_il.clone(),
|
||||
}));
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -984,6 +984,13 @@ pub struct SseHead {
|
||||
pub execution_optimistic: bool,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug, Serialize, Deserialize, Clone)]
|
||||
#[serde(bound = "E: EthSpec")]
|
||||
pub struct SseInclusionList<E: EthSpec> {
|
||||
pub version: ForkName,
|
||||
pub data: SignedInclusionList<E>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
|
||||
pub struct BlockGossip {
|
||||
pub slot: Slot,
|
||||
@@ -1130,7 +1137,7 @@ pub enum EventKind<E: EthSpec> {
|
||||
AttesterSlashing(Box<AttesterSlashing<E>>),
|
||||
BlsToExecutionChange(Box<SignedBlsToExecutionChange>),
|
||||
BlockGossip(Box<BlockGossip>),
|
||||
InclusionList(Box<SignedInclusionList<E>>),
|
||||
InclusionList(SseInclusionList<E>),
|
||||
}
|
||||
|
||||
impl<E: EthSpec> EventKind<E> {
|
||||
|
||||
@@ -27,6 +27,7 @@ pub struct InclusionList<E: EthSpec> {
|
||||
#[serde(with = "serde_utils::quoted_u64")]
|
||||
pub validator_index: u64,
|
||||
pub inclusion_list_committee_root: Hash256,
|
||||
#[serde(with = "ssz_types::serde_utils::list_of_hex_var_list")]
|
||||
pub transactions: Transactions<E>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user