prysm-pulse/slasher/detection/attestations/iface/iface.go
Raul Jordan 546196a6fa
Other Package Godocs for Prysm (#5681)
* 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
2020-04-29 21:32:39 +00:00

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
}