prysm-pulse/validator/internal/validator_service_mock.go
Raul Jordan 3d8bb73f15
Attester RPC Server Functions (#1505)
* initial validator attesthead rewrite based on proposer rewrite

* proceed with fetching committees and tree hashing the canonical head at assigned attester slot

* complete filling the properties of attestation data and all associated root hashes

* add when to attest todo

* finish entire attester client logic

* tests with mocks checked in

* tests passing in client

* stubbed out server implementation

* fixed build due to old property

* regen mocks with new mockgen version

* fixed broken tests

* complete bazel build fix

* address some review comments

* deep proto test

* server implementation logic

* attestation info tests

* completed passing tests, tree hash still blocked by error with nil fields unfortunately

* fix todo failure

* gazelle rerun and master merge

* testing full behavior of attestation info server

* finished all required server tests and implementation

* break loop

* fix tests due to genesis slot updates
2019-02-11 10:15:25 -06:00

97 lines
4.0 KiB
Go
Generated

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1 (interfaces: ValidatorServiceClient)
package internal
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
v1 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
grpc "google.golang.org/grpc"
)
// MockValidatorServiceClient is a mock of ValidatorServiceClient interface
type MockValidatorServiceClient struct {
ctrl *gomock.Controller
recorder *MockValidatorServiceClientMockRecorder
}
// MockValidatorServiceClientMockRecorder is the mock recorder for MockValidatorServiceClient
type MockValidatorServiceClientMockRecorder struct {
mock *MockValidatorServiceClient
}
// NewMockValidatorServiceClient creates a new mock instance
func NewMockValidatorServiceClient(ctrl *gomock.Controller) *MockValidatorServiceClient {
mock := &MockValidatorServiceClient{ctrl: ctrl}
mock.recorder = &MockValidatorServiceClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockValidatorServiceClient) EXPECT() *MockValidatorServiceClientMockRecorder {
return m.recorder
}
// ValidatorCommitteeAtSlot mocks base method
func (m *MockValidatorServiceClient) ValidatorCommitteeAtSlot(arg0 context.Context, arg1 *v1.CommitteeRequest, arg2 ...grpc.CallOption) (*v1.CommitteeResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ValidatorCommitteeAtSlot", varargs...)
ret0, _ := ret[0].(*v1.CommitteeResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ValidatorCommitteeAtSlot indicates an expected call of ValidatorCommitteeAtSlot
func (mr *MockValidatorServiceClientMockRecorder) ValidatorCommitteeAtSlot(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorCommitteeAtSlot", reflect.TypeOf((*MockValidatorServiceClient)(nil).ValidatorCommitteeAtSlot), varargs...)
}
// ValidatorEpochAssignments mocks base method
func (m *MockValidatorServiceClient) ValidatorEpochAssignments(arg0 context.Context, arg1 *v1.ValidatorEpochAssignmentsRequest, arg2 ...grpc.CallOption) (*v1.ValidatorEpochAssignmentsResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ValidatorEpochAssignments", varargs...)
ret0, _ := ret[0].(*v1.ValidatorEpochAssignmentsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ValidatorEpochAssignments indicates an expected call of ValidatorEpochAssignments
func (mr *MockValidatorServiceClientMockRecorder) ValidatorEpochAssignments(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorEpochAssignments", reflect.TypeOf((*MockValidatorServiceClient)(nil).ValidatorEpochAssignments), varargs...)
}
// ValidatorIndex mocks base method
func (m *MockValidatorServiceClient) ValidatorIndex(arg0 context.Context, arg1 *v1.ValidatorIndexRequest, arg2 ...grpc.CallOption) (*v1.ValidatorIndexResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ValidatorIndex", varargs...)
ret0, _ := ret[0].(*v1.ValidatorIndexResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ValidatorIndex indicates an expected call of ValidatorIndex
func (mr *MockValidatorServiceClientMockRecorder) ValidatorIndex(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorIndex", reflect.TypeOf((*MockValidatorServiceClient)(nil).ValidatorIndex), varargs...)
}