Event bls

This commit is contained in:
Tan Chee Keong
2024-05-22 20:53:53 +08:00
parent ecd82f302c
commit b5adaa5572
2 changed files with 9 additions and 9 deletions

View File

@@ -2515,14 +2515,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
.observed_bls_to_execution_changes
.lock()
.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.
@@ -2562,6 +2554,14 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
bls_to_execution_change: SigVerifiedOp<SignedBlsToExecutionChange, T::EthSpec>,
received_pre_capella: ReceivedPreCapella,
) -> 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() {
self.op_pool
.insert_bls_to_execution_change(bls_to_execution_change, received_pre_capella)