prysm-pulse/validator/slashing-protection/protector.go
Shay Zluf af46fc7707
Fix propose protect error handling (#7188)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-11 09:53:53 -05:00

17 lines
587 B
Go

package slashingprotection
import (
"context"
eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
)
// Protector interface defines the methods of the service that provides slashing protection.
type Protector interface {
CheckAttestationSafety(ctx context.Context, attestation *eth.IndexedAttestation) bool
CommitAttestation(ctx context.Context, attestation *eth.IndexedAttestation) bool
CheckBlockSafety(ctx context.Context, blockHeader *eth.BeaconBlockHeader) bool
CommitBlock(ctx context.Context, blockHeader *eth.SignedBeaconBlockHeader) (bool, error)
Status() error
}