prysm-pulse/shared/mock/beacon_chain_service_mock.go
Jim McDonald ad7d9ab1da
Validator status updates (#4675)
* Update ValidatorStatus to match Ethereum APIs
* Tidy up status calculation
* Merge branch 'master' into validator-status-updates
* Merge branch 'master' into validator-status-updates
* Update beacon-chain/rpc/beacon/config.go

Co-Authored-By: Ivan Martinez <ivanthegreatdev@gmail.com>
* Update test names
2020-01-30 19:46:37 +00:00

359 lines
16 KiB
Go
Generated

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/prysmaticlabs/ethereumapis/eth/v1alpha1 (interfaces: BeaconChainClient)
// Package internal is a generated GoMock package.
package mock
import (
context "context"
reflect "reflect"
empty "github.com/gogo/protobuf/types"
gomock "github.com/golang/mock/gomock"
v1alpha1 "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
grpc "google.golang.org/grpc"
)
// MockBeaconChainClient is a mock of BeaconChainClient interface
type MockBeaconChainClient struct {
ctrl *gomock.Controller
recorder *MockBeaconChainClientMockRecorder
}
// MockBeaconChainClientMockRecorder is the mock recorder for MockBeaconChainClient
type MockBeaconChainClientMockRecorder struct {
mock *MockBeaconChainClient
}
// NewMockBeaconChainClient creates a new mock instance
func NewMockBeaconChainClient(ctrl *gomock.Controller) *MockBeaconChainClient {
mock := &MockBeaconChainClient{ctrl: ctrl}
mock.recorder = &MockBeaconChainClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockBeaconChainClient) EXPECT() *MockBeaconChainClientMockRecorder {
return m.recorder
}
// AttestationPool mocks base method
func (m *MockBeaconChainClient) AttestationPool(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (*v1alpha1.AttestationPoolResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "AttestationPool", varargs...)
ret0, _ := ret[0].(*v1alpha1.AttestationPoolResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AttestationPool indicates an expected call of AttestationPool
func (mr *MockBeaconChainClientMockRecorder) AttestationPool(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, "AttestationPool", reflect.TypeOf((*MockBeaconChainClient)(nil).AttestationPool), varargs...)
}
// GetChainHead mocks base method
func (m *MockBeaconChainClient) GetChainHead(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (*v1alpha1.ChainHead, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetChainHead", varargs...)
ret0, _ := ret[0].(*v1alpha1.ChainHead)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetChainHead indicates an expected call of GetChainHead
func (mr *MockBeaconChainClientMockRecorder) GetChainHead(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, "GetChainHead", reflect.TypeOf((*MockBeaconChainClient)(nil).GetChainHead), varargs...)
}
// GetBeaconConfig mocks base method
func (m *MockBeaconChainClient) GetBeaconConfig(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (*v1alpha1.BeaconConfig, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetBeaconConfig", varargs...)
ret0, _ := ret[0].(*v1alpha1.BeaconConfig)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetBeaconConfig indicates an expected call of GetBeaconConfig
func (mr *MockBeaconChainClientMockRecorder) GetBeaconConfig(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, "GetBeaconConfig", reflect.TypeOf((*MockBeaconChainClient)(nil).GetBeaconConfig), varargs...)
}
// GetValidator mocks base method
func (m *MockBeaconChainClient) GetValidator(arg0 context.Context, arg1 *v1alpha1.GetValidatorRequest, arg2 ...grpc.CallOption) (*v1alpha1.Validator, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetValidator", varargs...)
ret0, _ := ret[0].(*v1alpha1.Validator)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetValidator indicates an expected call of GetValidator
func (mr *MockBeaconChainClientMockRecorder) GetValidator(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, "GetValidator", reflect.TypeOf((*MockBeaconChainClient)(nil).GetValidator), varargs...)
}
// GetValidatorActiveSetChanges mocks base method
func (m *MockBeaconChainClient) GetValidatorActiveSetChanges(arg0 context.Context, arg1 *v1alpha1.GetValidatorActiveSetChangesRequest, arg2 ...grpc.CallOption) (*v1alpha1.ActiveSetChanges, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetValidatorActiveSetChanges", varargs...)
ret0, _ := ret[0].(*v1alpha1.ActiveSetChanges)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetValidatorActiveSetChanges indicates an expected call of GetValidatorActiveSetChanges
func (mr *MockBeaconChainClientMockRecorder) GetValidatorActiveSetChanges(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, "GetValidatorActiveSetChanges", reflect.TypeOf((*MockBeaconChainClient)(nil).GetValidatorActiveSetChanges), varargs...)
}
// GetValidatorParticipation mocks base method
func (m *MockBeaconChainClient) GetValidatorParticipation(arg0 context.Context, arg1 *v1alpha1.GetValidatorParticipationRequest, arg2 ...grpc.CallOption) (*v1alpha1.ValidatorParticipationResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetValidatorParticipation", varargs...)
ret0, _ := ret[0].(*v1alpha1.ValidatorParticipationResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetValidatorParticipation indicates an expected call of GetValidatorParticipation
func (mr *MockBeaconChainClientMockRecorder) GetValidatorParticipation(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, "GetValidatorParticipation", reflect.TypeOf((*MockBeaconChainClient)(nil).GetValidatorParticipation), varargs...)
}
// GetValidatorPerformance mocks base method
func (m *MockBeaconChainClient) GetValidatorPerformance(arg0 context.Context, arg1 *v1alpha1.ValidatorPerformanceRequest, arg2 ...grpc.CallOption) (*v1alpha1.ValidatorPerformanceResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetValidatorPerformance", varargs...)
ret0, _ := ret[0].(*v1alpha1.ValidatorPerformanceResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetValidatorPerformance indicates an expected call of GetValidatorPerformance
func (mr *MockBeaconChainClientMockRecorder) GetValidatorPerformance(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, "GetValidatorPerformance", reflect.TypeOf((*MockBeaconChainClient)(nil).GetValidatorPerformance), varargs...)
}
// GetValidatorQueue mocks base method
func (m *MockBeaconChainClient) GetValidatorQueue(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (*v1alpha1.ValidatorQueue, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetValidatorQueue", varargs...)
ret0, _ := ret[0].(*v1alpha1.ValidatorQueue)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetValidatorQueue indicates an expected call of GetValidatorQueue
func (mr *MockBeaconChainClientMockRecorder) GetValidatorQueue(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, "GetValidatorQueue", reflect.TypeOf((*MockBeaconChainClient)(nil).GetValidatorQueue), varargs...)
}
// ListAttestations mocks base method
func (m *MockBeaconChainClient) ListAttestations(arg0 context.Context, arg1 *v1alpha1.ListAttestationsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListAttestationsResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ListAttestations", varargs...)
ret0, _ := ret[0].(*v1alpha1.ListAttestationsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListAttestations indicates an expected call of ListAttestations
func (mr *MockBeaconChainClientMockRecorder) ListAttestations(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, "ListAttestations", reflect.TypeOf((*MockBeaconChainClient)(nil).ListAttestations), varargs...)
}
// ListBeaconCommittees mocks base method
func (m *MockBeaconChainClient) ListBeaconCommittees(arg0 context.Context, arg1 *v1alpha1.ListCommitteesRequest, arg2 ...grpc.CallOption) (*v1alpha1.BeaconCommittees, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ListBeaconCommittees", varargs...)
ret0, _ := ret[0].(*v1alpha1.BeaconCommittees)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListBeaconCommittees indicates an expected call of ListBeaconCommittees
func (mr *MockBeaconChainClientMockRecorder) ListBeaconCommittees(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, "ListBeaconCommittees", reflect.TypeOf((*MockBeaconChainClient)(nil).ListBeaconCommittees), varargs...)
}
// ListBlocks mocks base method
func (m *MockBeaconChainClient) ListBlocks(arg0 context.Context, arg1 *v1alpha1.ListBlocksRequest, arg2 ...grpc.CallOption) (*v1alpha1.ListBlocksResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ListBlocks", varargs...)
ret0, _ := ret[0].(*v1alpha1.ListBlocksResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListBlocks indicates an expected call of ListBlocks
func (mr *MockBeaconChainClientMockRecorder) ListBlocks(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, "ListBlocks", reflect.TypeOf((*MockBeaconChainClient)(nil).ListBlocks), varargs...)
}
// ListValidatorAssignments mocks base method
func (m *MockBeaconChainClient) ListValidatorAssignments(arg0 context.Context, arg1 *v1alpha1.ListValidatorAssignmentsRequest, arg2 ...grpc.CallOption) (*v1alpha1.ValidatorAssignments, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ListValidatorAssignments", varargs...)
ret0, _ := ret[0].(*v1alpha1.ValidatorAssignments)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListValidatorAssignments indicates an expected call of ListValidatorAssignments
func (mr *MockBeaconChainClientMockRecorder) ListValidatorAssignments(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, "ListValidatorAssignments", reflect.TypeOf((*MockBeaconChainClient)(nil).ListValidatorAssignments), varargs...)
}
// ListValidatorBalances mocks base method
func (m *MockBeaconChainClient) ListValidatorBalances(arg0 context.Context, arg1 *v1alpha1.ListValidatorBalancesRequest, arg2 ...grpc.CallOption) (*v1alpha1.ValidatorBalances, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ListValidatorBalances", varargs...)
ret0, _ := ret[0].(*v1alpha1.ValidatorBalances)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListValidatorBalances indicates an expected call of ListValidatorBalances
func (mr *MockBeaconChainClientMockRecorder) ListValidatorBalances(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, "ListValidatorBalances", reflect.TypeOf((*MockBeaconChainClient)(nil).ListValidatorBalances), varargs...)
}
// ListValidators mocks base method
func (m *MockBeaconChainClient) ListValidators(arg0 context.Context, arg1 *v1alpha1.ListValidatorsRequest, arg2 ...grpc.CallOption) (*v1alpha1.Validators, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ListValidators", varargs...)
ret0, _ := ret[0].(*v1alpha1.Validators)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListValidators indicates an expected call of ListValidators
func (mr *MockBeaconChainClientMockRecorder) ListValidators(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, "ListValidators", reflect.TypeOf((*MockBeaconChainClient)(nil).ListValidators), varargs...)
}
// StreamAttestations mocks base method
func (m *MockBeaconChainClient) StreamAttestations(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (v1alpha1.BeaconChain_StreamAttestationsClient, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "StreamAttestations", varargs...)
ret0, _ := ret[0].(v1alpha1.BeaconChain_StreamAttestationsClient)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StreamAttestations indicates an expected call of StreamAttestations
func (mr *MockBeaconChainClientMockRecorder) StreamAttestations(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, "StreamAttestations", reflect.TypeOf((*MockBeaconChainClient)(nil).StreamAttestations), varargs...)
}
// StreamChainHead mocks base method
func (m *MockBeaconChainClient) StreamChainHead(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (v1alpha1.BeaconChain_StreamChainHeadClient, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "StreamChainHead", varargs...)
ret0, _ := ret[0].(v1alpha1.BeaconChain_StreamChainHeadClient)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StreamChainHead indicates an expected call of StreamChainHead
func (mr *MockBeaconChainClientMockRecorder) StreamChainHead(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, "StreamChainHead", reflect.TypeOf((*MockBeaconChainClient)(nil).StreamChainHead), varargs...)
}