mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 16:37:39 +00:00
546196a6fa
* e2e docs * slasher docs * Merge branch 'other-package-godocs' of github.com:prysmaticlabs/prysm into other-package-godocs * all validator package comments * Merge branch 'master' into other-package-godocs * completed all other packages * Merge branch 'master' into other-package-godocs * Merge refs/heads/master into other-package-godocs
22 lines
599 B
Go
22 lines
599 B
Go
// Package iface defines an interface for a slashable attestation detector struct.
|
|
package iface
|
|
|
|
import (
|
|
"context"
|
|
|
|
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
|
"github.com/prysmaticlabs/prysm/slasher/detection/attestations/types"
|
|
)
|
|
|
|
// SpanDetector defines an interface for Spanners to follow to allow mocks.
|
|
type SpanDetector interface {
|
|
// Read functions.
|
|
DetectSlashingsForAttestation(
|
|
ctx context.Context,
|
|
att *ethpb.IndexedAttestation,
|
|
) ([]*types.DetectionResult, error)
|
|
|
|
// Write functions.
|
|
UpdateSpans(ctx context.Context, att *ethpb.IndexedAttestation) error
|
|
}
|