mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
d17996f8b0
* Update V3 from V4 * Fix build v3 -> v4 * Update ssz * Update beacon_chain.pb.go * Fix formatter import * Update update-mockgen.sh comment to v4 * Fix conflicts. Pass build and tests * Fix test
27 lines
835 B
Go
27 lines
835 B
Go
package sync
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/pkg/errors"
|
|
"github.com/prysmaticlabs/prysm/v4/beacon-chain/core/feed"
|
|
opfeed "github.com/prysmaticlabs/prysm/v4/beacon-chain/core/feed/operation"
|
|
ethpb "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1"
|
|
"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", ðpb.SignedBLSToExecutionChange{}, msg)
|
|
}
|
|
s.cfg.operationNotifier.OperationFeed().Send(&feed.Event{
|
|
Type: opfeed.BLSToExecutionChangeReceived,
|
|
Data: &opfeed.BLSToExecutionChangeReceivedData{
|
|
Change: blsMsg,
|
|
},
|
|
})
|
|
s.cfg.blsToExecPool.InsertBLSToExecChange(blsMsg)
|
|
return nil
|
|
}
|