mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-07 10:12:19 +00:00
22 lines
535 B
Go
22 lines
535 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)
|
||
|
|
||
|
// Write functions.
|
||
|
UpdateSpans(ctx context.Context, att *ethpb.IndexedAttestation) error
|
||
|
}
|