mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-31 23:41:22 +00:00
b633dfe880
* Change span updates to update multiple validators at once * Change detection to perform on multiple validators at once * Fix minspan issue * Fix indices * Fix test * Remove logs * Remove more logs * Update slasher/detection/attestations/spanner_test.go * Update slasher/detection/attestations/spanner_test.go * Update slasher/detection/attestations/spanner_test.go * Update slasher/detection/detect.go * nil check * fix ununsed import Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
21 lines
516 B
Go
21 lines
516 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.
|
|
DetectSlashingsForAttestation(
|
|
ctx context.Context,
|
|
att *ethpb.IndexedAttestation,
|
|
) ([]*types.DetectionResult, error)
|
|
|
|
// Write functions.
|
|
UpdateSpans(ctx context.Context, att *ethpb.IndexedAttestation) error
|
|
}
|