Documentation ¶
Index ¶
- type MockProtector
- func (mp MockProtector) CheckAttestationSafety(ctx context.Context, attestation *eth.IndexedAttestation) bool
- func (mp MockProtector) CheckBlockSafety(ctx context.Context, blockHeader *eth.BeaconBlockHeader) bool
- func (mp MockProtector) CommitAttestation(ctx context.Context, attestation *eth.IndexedAttestation) bool
- func (mp MockProtector) CommitBlock(ctx context.Context, blockHeader *eth.SignedBeaconBlockHeader) bool
- func (mp MockProtector) Status() error
- type MockSlasher
- func (ms MockSlasher) IsSlashableAttestation(ctx context.Context, in *eth.IndexedAttestation, opts ...grpc.CallOption) (*slashpb.AttesterSlashingResponse, error)
- func (ms MockSlasher) IsSlashableAttestationNoUpdate(ctx context.Context, in *eth.IndexedAttestation, opts ...grpc.CallOption) (*slashpb.Slashable, error)
- func (ms MockSlasher) IsSlashableBlock(ctx context.Context, in *eth.SignedBeaconBlockHeader, opts ...grpc.CallOption) (*slashpb.ProposerSlashingResponse, error)
- func (ms MockSlasher) IsSlashableBlockNoUpdate(ctx context.Context, in *eth.BeaconBlockHeader, opts ...grpc.CallOption) (*slashpb.Slashable, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockProtector ¶
type MockProtector struct { AllowAttestation bool AllowBlock bool VerifyAttestationCalled bool CommitAttestationCalled bool VerifyBlockCalled bool CommitBlockCalled bool StatusCalled bool }
MockProtector mocks the protector.
func (MockProtector) CheckAttestationSafety ¶
func (mp MockProtector) CheckAttestationSafety(ctx context.Context, attestation *eth.IndexedAttestation) bool
CheckAttestationSafety returns bool with allow attestation value.
func (MockProtector) CheckBlockSafety ¶
func (mp MockProtector) CheckBlockSafety(ctx context.Context, blockHeader *eth.BeaconBlockHeader) bool
CheckBlockSafety returns bool with allow block value.
func (MockProtector) CommitAttestation ¶
func (mp MockProtector) CommitAttestation(ctx context.Context, attestation *eth.IndexedAttestation) bool
CommitAttestation returns bool with allow attestation value.
func (MockProtector) CommitBlock ¶
func (mp MockProtector) CommitBlock(ctx context.Context, blockHeader *eth.SignedBeaconBlockHeader) bool
CommitBlock returns bool with allow block value.
type MockSlasher ¶
type MockSlasher struct { SlashAttestation bool SlashBlock bool IsSlashableAttestationCalled bool IsSlashableAttestationNoUpdateCalled bool IsSlashableBlockCalled bool IsSlashableBlockNoUpdateCalled bool }
MockSlasher mocks the slasher rpc server.
func (MockSlasher) IsSlashableAttestation ¶
func (ms MockSlasher) IsSlashableAttestation(ctx context.Context, in *eth.IndexedAttestation, opts ...grpc.CallOption) (*slashpb.AttesterSlashingResponse, error)
IsSlashableAttestation returns slashbale attestation if slash attestation is set to true.
func (MockSlasher) IsSlashableAttestationNoUpdate ¶
func (ms MockSlasher) IsSlashableAttestationNoUpdate(ctx context.Context, in *eth.IndexedAttestation, opts ...grpc.CallOption) (*slashpb.Slashable, error)
IsSlashableAttestationNoUpdate returns slashbale if slash attestation is set to true.
func (MockSlasher) IsSlashableBlock ¶
func (ms MockSlasher) IsSlashableBlock(ctx context.Context, in *eth.SignedBeaconBlockHeader, opts ...grpc.CallOption) (*slashpb.ProposerSlashingResponse, error)
IsSlashableBlock returns proposer slashing if slash block is set to true.
func (MockSlasher) IsSlashableBlockNoUpdate ¶
func (ms MockSlasher) IsSlashableBlockNoUpdate(ctx context.Context, in *eth.BeaconBlockHeader, opts ...grpc.CallOption) (*slashpb.Slashable, error)
IsSlashableBlockNoUpdate returns slashbale if slash block is set to true.