mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-31 23:41:22 +00:00
703ce63c12
* Remove filter, replace with slot + committee index * Change bloom filter to 2 sig bytes * Fix comment * Fix line
25 lines
801 B
Go
25 lines
801 B
Go
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.
|
|
DetectSlashingForValidator(
|
|
ctx context.Context,
|
|
validatorIdx uint64,
|
|
attData *ethpb.AttestationData,
|
|
) (*types.DetectionResult, error)
|
|
SpanForEpochByValidator(ctx context.Context, valIdx uint64, epoch uint64) (types.Span, error)
|
|
ValidatorSpansByEpoch(ctx context.Context, epoch uint64) map[uint64]types.Span
|
|
|
|
// Write functions.
|
|
UpdateSpans(ctx context.Context, att *ethpb.IndexedAttestation) error
|
|
DeleteValidatorSpansByEpoch(ctx context.Context, validatorIdx uint64, epoch uint64) error
|
|
}
|