prysm-pulse/beacon-chain/sync/subscriber_beacon_attestation.go
Preston Van Loon ce65b11801 Beacon attestation pubsub subscriber (#3289)
* beacon attestation subscriber

* register beacon attestation handler

* fix tests
2019-08-23 14:46:04 -05:00

15 lines
425 B
Go

package sync
import (
"context"
"github.com/gogo/protobuf/proto"
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
)
// beaconAttestationSubscriber forwards the incoming validated attestation to the blockchain
// service for processing.
func (r *RegularSync) beaconAttestationSubscriber(ctx context.Context, msg proto.Message) error {
return r.chain.ReceiveAttestationNoPubsub(ctx, msg.(*ethpb.Attestation))
}