github.com/prysmaticlabs/prysm@v1.4.4/slasher/detection/attestations/iface/iface.go (about) 1 // Package iface defines an interface for a slashable attestation detector struct. 2 package iface 3 4 import ( 5 "context" 6 7 ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" 8 "github.com/prysmaticlabs/prysm/slasher/detection/attestations/types" 9 ) 10 11 // SpanDetector defines an interface for Spanners to follow to allow mocks. 12 type SpanDetector interface { 13 // Read functions. 14 DetectSlashingsForAttestation( 15 ctx context.Context, 16 att *ethpb.IndexedAttestation, 17 ) ([]*types.DetectionResult, error) 18 19 // Write functions. 20 UpdateSpans(ctx context.Context, att *ethpb.IndexedAttestation) error 21 }