prysm-pulse/beacon-chain/sync/subscriber_blob_sidecar.go
kasey 1123df7432
Verified roblobs (#13190)
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-11-21 18:44:38 +00:00

34 lines
704 B
Go

package sync
import (
"context"
"fmt"
"github.com/prysmaticlabs/prysm/v4/consensus-types/blocks"
"google.golang.org/protobuf/proto"
)
func (s *Service) blobSubscriber(ctx context.Context, msg proto.Message) error {
b, ok := msg.(blocks.VerifiedROBlob)
if !ok {
return fmt.Errorf("message was not type blocks.ROBlob, type=%T", msg)
}
s.setSeenBlobIndex(b.BlockRootSlice(), b.Index)
if err := s.cfg.chain.ReceiveBlob(ctx, b); err != nil {
return err
}
// TODO: convert operations feed to use ROBlob.
/*
s.cfg.operationNotifier.OperationFeed().Send(&feed.Event{
Type: opfeed.BlobSidecarReceived,
Data: &opfeed.BlobSidecarReceivedData{
Blob: b,
},
})
*/
return nil
}