Files
prysm/beacon-chain/sync/subscriber_bls_to_execution_change.go
Bastin 92bd211e4d upgrade v6 to v7 (#15989)
* upgrade v6 to v7

* changelog

* update-go-ssz
2025-11-06 16:16:23 +00:00

27 lines
832 B
Go

package sync
import (
"context"
"github.com/OffchainLabs/prysm/v7/beacon-chain/core/feed"
opfeed "github.com/OffchainLabs/prysm/v7/beacon-chain/core/feed/operation"
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
)
func (s *Service) blsToExecutionChangeSubscriber(_ context.Context, msg proto.Message) error {
blsMsg, ok := msg.(*ethpb.SignedBLSToExecutionChange)
if !ok {
return errors.Errorf("incorrect type of message received, wanted %T but got %T", &ethpb.SignedBLSToExecutionChange{}, msg)
}
s.cfg.operationNotifier.OperationFeed().Send(&feed.Event{
Type: opfeed.BLSToExecutionChangeReceived,
Data: &opfeed.BLSToExecutionChangeReceivedData{
Change: blsMsg,
},
})
s.cfg.blsToExecPool.InsertBLSToExecChange(blsMsg)
return nil
}