mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 11:57: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
25 lines
557 B
Go
25 lines
557 B
Go
package sync
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/pkg/errors"
|
|
ethpb "github.com/prysmaticlabs/prysm/v4/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)
|
|
}
|