prysm-pulse/beacon-chain/sync/subscriber_sync_committee_message.go
terence 5a66807989
Update to V5 (#13622)
* First take at updating everything to v5

* Patch gRPC gateway to use prysm v5

Fix patch

* Update go ssz

---------

Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
2024-02-15 05:46:47 +00:00

25 lines
557 B
Go

package sync
import (
"context"
"fmt"
"github.com/pkg/errors"
ethpb "github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1"
"google.golang.org/protobuf/proto"
)
// skipcq: SCC-U1000
func (s *Service) syncCommitteeMessageSubscriber(_ context.Context, msg proto.Message) error {
m, ok := msg.(*ethpb.SyncCommitteeMessage)
if !ok {
return fmt.Errorf("message was not type *ethpb.SyncCommitteeMessage, type=%T", msg)
}
if m == nil {
return errors.New("nil sync committee message")
}
return s.cfg.syncCommsPool.SaveSyncCommitteeMessage(m)
}