mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
f0fcebccc4
* Get started on cleaning up slashing protection * Merge branch 'master' of github.com:prysmaticlabs/prysm into cleanup-protection * Move protection functions to own files * Lint * Merge branch 'master' of github.com:prysmaticlabs/prysm into cleanup-protection * Begin adding test for proposal protection * Merge branch 'master' of github.com:prysmaticlabs/prysm into cleanup-protection * Fix build * Fix tests * Fix tst * Fix tests * Fix proposal tests * Merge branch 'master' into cleanup-protection * Merge branch 'master' into cleanup-protection * Merge branch 'master' into cleanup-protection * Merge branch 'master' of github.com:prysmaticlabs/prysm into cleanup-protection * Reorder protections * Change lock * Fix test * Merge branch 'master' into cleanup-protection * Merge branch 'master' into cleanup-protection * Merge branch 'master' into cleanup-protection * Change log * Merge branch 'cleanup-protection' of github.com:prysmaticlabs/prysm into cleanup-protection * Merge branch 'master' into cleanup-protection
16 lines
562 B
Go
16 lines
562 B
Go
package slashingprotection
|
|
|
|
import (
|
|
"context"
|
|
|
|
eth "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
|
)
|
|
|
|
// Protector interface defines the methods of the service that provides slashing protection.
|
|
type Protector interface {
|
|
CheckAttestationSafety(ctx context.Context, attestation *eth.IndexedAttestation) bool
|
|
CommitAttestation(ctx context.Context, attestation *eth.IndexedAttestation) bool
|
|
CheckBlockSafety(ctx context.Context, blockHeader *eth.BeaconBlockHeader) bool
|
|
CommitBlock(ctx context.Context, blockHeader *eth.SignedBeaconBlockHeader) bool
|
|
}
|