Add bls_to_execution_change topic to eth1/v1/events (#5823)

* Add bls event

* Update events and types

* Add bls in event

* Event bls

* tests..rs

* change order

* another tests.rs

* Signed BLS

* Revert "another tests.rs"

This reverts commit 7f54e9c1ce.

* Revert "Signed BLS"

This reverts commit 1146bc734b.

* withdrawal_keyparis

* Fix genesis
This commit is contained in:
chonghe
2024-05-30 13:48:29 +08:00
committed by GitHub
parent 6daeec31e2
commit ffe29c087d
5 changed files with 58 additions and 0 deletions

View File

@@ -2589,6 +2589,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)