prysm-pulse/slasher/detection/attestations/iface/iface.go
Raul Jordan 6158a648cd
Plugging in spanner db (#5009)
* rem slasher proto

* with cache

* delete old code

* moving to bytes.go fix traces

* moving to bytes.go fix traces

* raul feedback

* raul feedback

* begin

* add eviction test

* ivan feedback

* ivan feedback

* test is running

* some comment improvements

* test included for bytes and bool

* import

* cleanup

* tests pass

* fill in all fields in test

* gaz

* fix integration

* gaz + goimports

* fix service.go

* remove sleep

* cleanup

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-03-05 12:11:54 -06:00

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
}