mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 11:57:18 +00:00
b4e72f1e19
* Update and use max per epoch churn limit * Update spec tests * Fix e2e test * deneb fork epoch condition * Fix lint and better casting * fix ordering * fix check * gaz * Fix more tests * Apply proposer boost to first block in equivocation * Increase timeout * Don't increase timeout, it's not the reason * implement deneb forkchoice spectests expose ReceiveBlob from the blockchain package * spin_off_helper * remove minimal tests * Terence's review * Add process register test for Deneb * Terence's suggestion Co-authored-by: terencechain <terence@prysmaticlabs.com> * fix forkchoice minimal * fix minimal sha * general sha * different repos * different repos --------- Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: nisdas <nishdas93@gmail.com>
33 lines
802 B
Go
33 lines
802 B
Go
package sync
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/prysmaticlabs/prysm/v4/beacon-chain/core/feed"
|
|
opfeed "github.com/prysmaticlabs/prysm/v4/beacon-chain/core/feed/operation"
|
|
eth "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1"
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
func (s *Service) blobSubscriber(ctx context.Context, msg proto.Message) error {
|
|
b, ok := msg.(*eth.SignedBlobSidecar)
|
|
if !ok {
|
|
return fmt.Errorf("message was not type *eth.SignedBlobSidecar, type=%T", msg)
|
|
}
|
|
|
|
s.setSeenBlobIndex(b.Message.Blob, b.Message.Index)
|
|
|
|
if err := s.cfg.chain.ReceiveBlob(ctx, b.Message); err != nil {
|
|
return err
|
|
}
|
|
|
|
s.cfg.operationNotifier.OperationFeed().Send(&feed.Event{
|
|
Type: opfeed.BlobSidecarReceived,
|
|
Data: &opfeed.BlobSidecarReceivedData{
|
|
Blob: b,
|
|
},
|
|
})
|
|
return nil
|
|
}
|