github.com/prysmaticlabs/prysm@v1.4.4/validator/slashing-protection/iface/protector.go (about)

     1  package iface
     2  
     3  import (
     4  	"context"
     5  
     6  	eth "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
     7  )
     8  
     9  // Protector interface defines the methods of the service that provides slashing protection.
    10  type Protector interface {
    11  	CheckAttestationSafety(ctx context.Context, attestation *eth.IndexedAttestation) bool
    12  	CommitAttestation(ctx context.Context, attestation *eth.IndexedAttestation) bool
    13  	CheckBlockSafety(ctx context.Context, blockHeader *eth.BeaconBlockHeader) bool
    14  	CommitBlock(ctx context.Context, blockHeader *eth.SignedBeaconBlockHeader) (bool, error)
    15  	Status() error
    16  }