mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-04 21:34:36 +00:00
Event bls
This commit is contained in:
@@ -2515,14 +2515,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
.observed_bls_to_execution_changes
|
.observed_bls_to_execution_changes
|
||||||
.lock()
|
.lock()
|
||||||
.verify_and_observe(bls_to_execution_change, head_state, &self.spec)?)
|
.verify_and_observe(bls_to_execution_change, head_state, &self.spec)?)
|
||||||
|
|
||||||
if let Some(event_handler) = self.event_handler.as_ref() {
|
|
||||||
if event_handler.has_bls_to_execution_change_subscribers() {
|
|
||||||
event_handler.register(EventKind::BlsToExecutionChange(Box::new(
|
|
||||||
Blt_To_Execution_Change.clone().into_inner(),
|
|
||||||
)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Verify a signed BLS to execution change before allowing it to propagate on the gossip network.
|
/// Verify a signed BLS to execution change before allowing it to propagate on the gossip network.
|
||||||
@@ -2562,6 +2554,14 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
bls_to_execution_change: SigVerifiedOp<SignedBlsToExecutionChange, T::EthSpec>,
|
bls_to_execution_change: SigVerifiedOp<SignedBlsToExecutionChange, T::EthSpec>,
|
||||||
received_pre_capella: ReceivedPreCapella,
|
received_pre_capella: ReceivedPreCapella,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
if let Some(event_handler) = self.event_handler.as_ref() {
|
||||||
|
if event_handler.has_bls_to_execution_change_subscribers() {
|
||||||
|
event_handler.register(EventKind::BlsToExecutionChange(Box::new(
|
||||||
|
bls_to_execution_change.clone().into_inner(),
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if self.eth1_chain.is_some() {
|
if self.eth1_chain.is_some() {
|
||||||
self.op_pool
|
self.op_pool
|
||||||
.insert_bls_to_execution_change(bls_to_execution_change, received_pre_capella)
|
.insert_bls_to_execution_change(bls_to_execution_change, received_pre_capella)
|
||||||
|
|||||||
@@ -1082,7 +1082,7 @@ pub enum EventKind<E: EthSpec> {
|
|||||||
PayloadAttributes(VersionedSsePayloadAttributes),
|
PayloadAttributes(VersionedSsePayloadAttributes),
|
||||||
ProposerSlashing(Box<ProposerSlashing>),
|
ProposerSlashing(Box<ProposerSlashing>),
|
||||||
AttesterSlashing(Box<AttesterSlashing<E>>),
|
AttesterSlashing(Box<AttesterSlashing<E>>),
|
||||||
BlsToExecutionChange(Box<BlsToExecutionChange>),
|
BlsToExecutionChange(Box<SignedBlsToExecutionChange>),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<E: EthSpec> EventKind<E> {
|
impl<E: EthSpec> EventKind<E> {
|
||||||
|
|||||||
Reference in New Issue
Block a user