mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-11 20:20:05 +00:00
7c49277e83
* WIP * WIP * Remove duplicate mock * WIP * Revert "WIP" This reverts commit a8010057fef4209dfddde34ea868b88f1e196c44. * Fix build break * Remove unused variable * Fix build break * Rename validator_mock to validatormock * Fix failing test --------- Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com> Co-authored-by: Radosław Kapka <rkapka@wp.pl>
30 lines
1000 B
Go
30 lines
1000 B
Go
package grpc_api
|
|
|
|
import (
|
|
"context"
|
|
|
|
ethpb "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1"
|
|
"github.com/prysmaticlabs/prysm/v4/validator/client/iface"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type grpcSlasherClient struct {
|
|
slasherClient ethpb.SlasherClient
|
|
}
|
|
|
|
func (c *grpcSlasherClient) IsSlashableAttestation(ctx context.Context, in *ethpb.IndexedAttestation) (*ethpb.AttesterSlashingResponse, error) {
|
|
return c.slasherClient.IsSlashableAttestation(ctx, in)
|
|
}
|
|
|
|
func (c *grpcSlasherClient) IsSlashableBlock(ctx context.Context, in *ethpb.SignedBeaconBlockHeader) (*ethpb.ProposerSlashingResponse, error) {
|
|
return c.slasherClient.IsSlashableBlock(ctx, in)
|
|
}
|
|
|
|
func (c *grpcSlasherClient) HighestAttestations(ctx context.Context, in *ethpb.HighestAttestationRequest) (*ethpb.HighestAttestationResponse, error) {
|
|
return c.slasherClient.HighestAttestations(ctx, in)
|
|
}
|
|
|
|
func NewSlasherClient(cc grpc.ClientConnInterface) iface.SlasherClient {
|
|
return &grpcSlasherClient{ethpb.NewSlasherClient(cc)}
|
|
}
|