2020-02-27 04:48:02 +00:00
|
|
|
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.
|
2020-03-09 18:14:19 +00:00
|
|
|
DetectSlashingsForAttestation(
|
2020-02-27 04:48:02 +00:00
|
|
|
ctx context.Context,
|
2020-03-09 18:14:19 +00:00
|
|
|
att *ethpb.IndexedAttestation,
|
|
|
|
) ([]*types.DetectionResult, error)
|
2020-02-27 04:48:02 +00:00
|
|
|
|
|
|
|
// Write functions.
|
|
|
|
UpdateSpans(ctx context.Context, att *ethpb.IndexedAttestation) error
|
|
|
|
}
|