github.com/lino-network/lino@v0.6.11/x/validator/mocks/ValidatorKeeper.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	amino "github.com/tendermint/go-amino"
     7  	abcitypes "github.com/tendermint/tendermint/abci/types"
     8  
     9  	crypto "github.com/tendermint/tendermint/crypto"
    10  
    11  	linotypes "github.com/lino-network/lino/types"
    12  
    13  	manager "github.com/lino-network/lino/x/validator/manager"
    14  
    15  	mock "github.com/stretchr/testify/mock"
    16  
    17  	model "github.com/lino-network/lino/x/validator/model"
    18  
    19  	types "github.com/cosmos/cosmos-sdk/types"
    20  )
    21  
    22  // ValidatorKeeper is an autogenerated mock type for the ValidatorKeeper type
    23  type ValidatorKeeper struct {
    24  	mock.Mock
    25  }
    26  
    27  // DistributeInflationToValidator provides a mock function with given fields: ctx
    28  func (_m *ValidatorKeeper) DistributeInflationToValidator(ctx types.Context) types.Error {
    29  	ret := _m.Called(ctx)
    30  
    31  	var r0 types.Error
    32  	if rf, ok := ret.Get(0).(func(types.Context) types.Error); ok {
    33  		r0 = rf(ctx)
    34  	} else {
    35  		if ret.Get(0) != nil {
    36  			r0 = ret.Get(0).(types.Error)
    37  		}
    38  	}
    39  
    40  	return r0
    41  }
    42  
    43  // ExportToFile provides a mock function with given fields: ctx, cdc, filepath
    44  func (_m *ValidatorKeeper) ExportToFile(ctx types.Context, cdc *amino.Codec, filepath string) error {
    45  	ret := _m.Called(ctx, cdc, filepath)
    46  
    47  	var r0 error
    48  	if rf, ok := ret.Get(0).(func(types.Context, *amino.Codec, string) error); ok {
    49  		r0 = rf(ctx, cdc, filepath)
    50  	} else {
    51  		r0 = ret.Error(0)
    52  	}
    53  
    54  	return r0
    55  }
    56  
    57  // GetCommittingValidatorVoteStatus provides a mock function with given fields: ctx
    58  func (_m *ValidatorKeeper) GetCommittingValidatorVoteStatus(ctx types.Context) []model.ReceivedVotesStatus {
    59  	ret := _m.Called(ctx)
    60  
    61  	var r0 []model.ReceivedVotesStatus
    62  	if rf, ok := ret.Get(0).(func(types.Context) []model.ReceivedVotesStatus); ok {
    63  		r0 = rf(ctx)
    64  	} else {
    65  		if ret.Get(0) != nil {
    66  			r0 = ret.Get(0).([]model.ReceivedVotesStatus)
    67  		}
    68  	}
    69  
    70  	return r0
    71  }
    72  
    73  // GetCommittingValidators provides a mock function with given fields: ctx
    74  func (_m *ValidatorKeeper) GetCommittingValidators(ctx types.Context) []linotypes.AccountKey {
    75  	ret := _m.Called(ctx)
    76  
    77  	var r0 []linotypes.AccountKey
    78  	if rf, ok := ret.Get(0).(func(types.Context) []linotypes.AccountKey); ok {
    79  		r0 = rf(ctx)
    80  	} else {
    81  		if ret.Get(0) != nil {
    82  			r0 = ret.Get(0).([]linotypes.AccountKey)
    83  		}
    84  	}
    85  
    86  	return r0
    87  }
    88  
    89  // GetElectionVoteList provides a mock function with given fields: ctx, accKey
    90  func (_m *ValidatorKeeper) GetElectionVoteList(ctx types.Context, accKey linotypes.AccountKey) *model.ElectionVoteList {
    91  	ret := _m.Called(ctx, accKey)
    92  
    93  	var r0 *model.ElectionVoteList
    94  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) *model.ElectionVoteList); ok {
    95  		r0 = rf(ctx, accKey)
    96  	} else {
    97  		if ret.Get(0) != nil {
    98  			r0 = ret.Get(0).(*model.ElectionVoteList)
    99  		}
   100  	}
   101  
   102  	return r0
   103  }
   104  
   105  // GetInitValidators provides a mock function with given fields: ctx
   106  func (_m *ValidatorKeeper) GetInitValidators(ctx types.Context) ([]abcitypes.ValidatorUpdate, types.Error) {
   107  	ret := _m.Called(ctx)
   108  
   109  	var r0 []abcitypes.ValidatorUpdate
   110  	if rf, ok := ret.Get(0).(func(types.Context) []abcitypes.ValidatorUpdate); ok {
   111  		r0 = rf(ctx)
   112  	} else {
   113  		if ret.Get(0) != nil {
   114  			r0 = ret.Get(0).([]abcitypes.ValidatorUpdate)
   115  		}
   116  	}
   117  
   118  	var r1 types.Error
   119  	if rf, ok := ret.Get(1).(func(types.Context) types.Error); ok {
   120  		r1 = rf(ctx)
   121  	} else {
   122  		if ret.Get(1) != nil {
   123  			r1 = ret.Get(1).(types.Error)
   124  		}
   125  	}
   126  
   127  	return r0, r1
   128  }
   129  
   130  // GetValidator provides a mock function with given fields: ctx, username
   131  func (_m *ValidatorKeeper) GetValidator(ctx types.Context, username linotypes.AccountKey) (*model.Validator, types.Error) {
   132  	ret := _m.Called(ctx, username)
   133  
   134  	var r0 *model.Validator
   135  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) *model.Validator); ok {
   136  		r0 = rf(ctx, username)
   137  	} else {
   138  		if ret.Get(0) != nil {
   139  			r0 = ret.Get(0).(*model.Validator)
   140  		}
   141  	}
   142  
   143  	var r1 types.Error
   144  	if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey) types.Error); ok {
   145  		r1 = rf(ctx, username)
   146  	} else {
   147  		if ret.Get(1) != nil {
   148  			r1 = ret.Get(1).(types.Error)
   149  		}
   150  	}
   151  
   152  	return r0, r1
   153  }
   154  
   155  // GetValidatorList provides a mock function with given fields: ctx
   156  func (_m *ValidatorKeeper) GetValidatorList(ctx types.Context) *model.ValidatorList {
   157  	ret := _m.Called(ctx)
   158  
   159  	var r0 *model.ValidatorList
   160  	if rf, ok := ret.Get(0).(func(types.Context) *model.ValidatorList); ok {
   161  		r0 = rf(ctx)
   162  	} else {
   163  		if ret.Get(0) != nil {
   164  			r0 = ret.Get(0).(*model.ValidatorList)
   165  		}
   166  	}
   167  
   168  	return r0
   169  }
   170  
   171  // GetValidatorUpdates provides a mock function with given fields: ctx
   172  func (_m *ValidatorKeeper) GetValidatorUpdates(ctx types.Context) ([]abcitypes.ValidatorUpdate, types.Error) {
   173  	ret := _m.Called(ctx)
   174  
   175  	var r0 []abcitypes.ValidatorUpdate
   176  	if rf, ok := ret.Get(0).(func(types.Context) []abcitypes.ValidatorUpdate); ok {
   177  		r0 = rf(ctx)
   178  	} else {
   179  		if ret.Get(0) != nil {
   180  			r0 = ret.Get(0).([]abcitypes.ValidatorUpdate)
   181  		}
   182  	}
   183  
   184  	var r1 types.Error
   185  	if rf, ok := ret.Get(1).(func(types.Context) types.Error); ok {
   186  		r1 = rf(ctx)
   187  	} else {
   188  		if ret.Get(1) != nil {
   189  			r1 = ret.Get(1).(types.Error)
   190  		}
   191  	}
   192  
   193  	return r0, r1
   194  }
   195  
   196  // Hooks provides a mock function with given fields:
   197  func (_m *ValidatorKeeper) Hooks() manager.Hooks {
   198  	ret := _m.Called()
   199  
   200  	var r0 manager.Hooks
   201  	if rf, ok := ret.Get(0).(func() manager.Hooks); ok {
   202  		r0 = rf()
   203  	} else {
   204  		r0 = ret.Get(0).(manager.Hooks)
   205  	}
   206  
   207  	return r0
   208  }
   209  
   210  // ImportFromFile provides a mock function with given fields: ctx, cdc, filepath
   211  func (_m *ValidatorKeeper) ImportFromFile(ctx types.Context, cdc *amino.Codec, filepath string) error {
   212  	ret := _m.Called(ctx, cdc, filepath)
   213  
   214  	var r0 error
   215  	if rf, ok := ret.Get(0).(func(types.Context, *amino.Codec, string) error); ok {
   216  		r0 = rf(ctx, cdc, filepath)
   217  	} else {
   218  		r0 = ret.Error(0)
   219  	}
   220  
   221  	return r0
   222  }
   223  
   224  // InitGenesis provides a mock function with given fields: ctx
   225  func (_m *ValidatorKeeper) InitGenesis(ctx types.Context) {
   226  	_m.Called(ctx)
   227  }
   228  
   229  // OnBeginBlock provides a mock function with given fields: ctx, req
   230  func (_m *ValidatorKeeper) OnBeginBlock(ctx types.Context, req abcitypes.RequestBeginBlock) {
   231  	_m.Called(ctx, req)
   232  }
   233  
   234  // PunishCommittingValidator provides a mock function with given fields: ctx, username, penalty, punishType
   235  func (_m *ValidatorKeeper) PunishCommittingValidator(ctx types.Context, username linotypes.AccountKey, penalty linotypes.Coin, punishType linotypes.PunishType) types.Error {
   236  	ret := _m.Called(ctx, username, penalty, punishType)
   237  
   238  	var r0 types.Error
   239  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, linotypes.Coin, linotypes.PunishType) types.Error); ok {
   240  		r0 = rf(ctx, username, penalty, punishType)
   241  	} else {
   242  		if ret.Get(0) != nil {
   243  			r0 = ret.Get(0).(types.Error)
   244  		}
   245  	}
   246  
   247  	return r0
   248  }
   249  
   250  // RegisterValidator provides a mock function with given fields: ctx, username, valPubKey, link
   251  func (_m *ValidatorKeeper) RegisterValidator(ctx types.Context, username linotypes.AccountKey, valPubKey crypto.PubKey, link string) types.Error {
   252  	ret := _m.Called(ctx, username, valPubKey, link)
   253  
   254  	var r0 types.Error
   255  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, crypto.PubKey, string) types.Error); ok {
   256  		r0 = rf(ctx, username, valPubKey, link)
   257  	} else {
   258  		if ret.Get(0) != nil {
   259  			r0 = ret.Get(0).(types.Error)
   260  		}
   261  	}
   262  
   263  	return r0
   264  }
   265  
   266  // RevokeValidator provides a mock function with given fields: ctx, username
   267  func (_m *ValidatorKeeper) RevokeValidator(ctx types.Context, username linotypes.AccountKey) types.Error {
   268  	ret := _m.Called(ctx, username)
   269  
   270  	var r0 types.Error
   271  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) types.Error); ok {
   272  		r0 = rf(ctx, username)
   273  	} else {
   274  		if ret.Get(0) != nil {
   275  			r0 = ret.Get(0).(types.Error)
   276  		}
   277  	}
   278  
   279  	return r0
   280  }
   281  
   282  // UpdateValidator provides a mock function with given fields: ctx, username, link
   283  func (_m *ValidatorKeeper) UpdateValidator(ctx types.Context, username linotypes.AccountKey, link string) types.Error {
   284  	ret := _m.Called(ctx, username, link)
   285  
   286  	var r0 types.Error
   287  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, string) types.Error); ok {
   288  		r0 = rf(ctx, username, link)
   289  	} else {
   290  		if ret.Get(0) != nil {
   291  			r0 = ret.Get(0).(types.Error)
   292  		}
   293  	}
   294  
   295  	return r0
   296  }
   297  
   298  // VoteValidator provides a mock function with given fields: ctx, username, votedValidators
   299  func (_m *ValidatorKeeper) VoteValidator(ctx types.Context, username linotypes.AccountKey, votedValidators []linotypes.AccountKey) types.Error {
   300  	ret := _m.Called(ctx, username, votedValidators)
   301  
   302  	var r0 types.Error
   303  	if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey, []linotypes.AccountKey) types.Error); ok {
   304  		r0 = rf(ctx, username, votedValidators)
   305  	} else {
   306  		if ret.Get(0) != nil {
   307  			r0 = ret.Get(0).(types.Error)
   308  		}
   309  	}
   310  
   311  	return r0
   312  }