github.com/KYVENetwork/cometbft/v38@v38.0.3/state/mocks/store.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	abcitypes "github.com/KYVENetwork/cometbft/v38/abci/types"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	state "github.com/KYVENetwork/cometbft/v38/state"
    10  
    11  	types "github.com/KYVENetwork/cometbft/v38/types"
    12  )
    13  
    14  // Store is an autogenerated mock type for the Store type
    15  type Store struct {
    16  	mock.Mock
    17  }
    18  
    19  // Bootstrap provides a mock function with given fields: _a0
    20  func (_m *Store) Bootstrap(_a0 state.State) error {
    21  	ret := _m.Called(_a0)
    22  
    23  	var r0 error
    24  	if rf, ok := ret.Get(0).(func(state.State) error); ok {
    25  		r0 = rf(_a0)
    26  	} else {
    27  		r0 = ret.Error(0)
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // Close provides a mock function with given fields:
    34  func (_m *Store) Close() error {
    35  	ret := _m.Called()
    36  
    37  	var r0 error
    38  	if rf, ok := ret.Get(0).(func() error); ok {
    39  		r0 = rf()
    40  	} else {
    41  		r0 = ret.Error(0)
    42  	}
    43  
    44  	return r0
    45  }
    46  
    47  // GetOfflineStateSyncHeight provides a mock function with given fields:
    48  func (_m *Store) GetOfflineStateSyncHeight() (int64, error) {
    49  	ret := _m.Called()
    50  
    51  	var r0 int64
    52  	var r1 error
    53  	if rf, ok := ret.Get(0).(func() (int64, error)); ok {
    54  		return rf()
    55  	}
    56  	if rf, ok := ret.Get(0).(func() int64); ok {
    57  		r0 = rf()
    58  	} else {
    59  		r0 = ret.Get(0).(int64)
    60  	}
    61  
    62  	if rf, ok := ret.Get(1).(func() error); ok {
    63  		r1 = rf()
    64  	} else {
    65  		r1 = ret.Error(1)
    66  	}
    67  
    68  	return r0, r1
    69  }
    70  
    71  // Load provides a mock function with given fields:
    72  func (_m *Store) Load() (state.State, error) {
    73  	ret := _m.Called()
    74  
    75  	var r0 state.State
    76  	var r1 error
    77  	if rf, ok := ret.Get(0).(func() (state.State, error)); ok {
    78  		return rf()
    79  	}
    80  	if rf, ok := ret.Get(0).(func() state.State); ok {
    81  		r0 = rf()
    82  	} else {
    83  		r0 = ret.Get(0).(state.State)
    84  	}
    85  
    86  	if rf, ok := ret.Get(1).(func() error); ok {
    87  		r1 = rf()
    88  	} else {
    89  		r1 = ret.Error(1)
    90  	}
    91  
    92  	return r0, r1
    93  }
    94  
    95  // LoadConsensusParams provides a mock function with given fields: _a0
    96  func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) {
    97  	ret := _m.Called(_a0)
    98  
    99  	var r0 types.ConsensusParams
   100  	var r1 error
   101  	if rf, ok := ret.Get(0).(func(int64) (types.ConsensusParams, error)); ok {
   102  		return rf(_a0)
   103  	}
   104  	if rf, ok := ret.Get(0).(func(int64) types.ConsensusParams); ok {
   105  		r0 = rf(_a0)
   106  	} else {
   107  		r0 = ret.Get(0).(types.ConsensusParams)
   108  	}
   109  
   110  	if rf, ok := ret.Get(1).(func(int64) error); ok {
   111  		r1 = rf(_a0)
   112  	} else {
   113  		r1 = ret.Error(1)
   114  	}
   115  
   116  	return r0, r1
   117  }
   118  
   119  // LoadFinalizeBlockResponse provides a mock function with given fields: _a0
   120  func (_m *Store) LoadFinalizeBlockResponse(_a0 int64) (*abcitypes.ResponseFinalizeBlock, error) {
   121  	ret := _m.Called(_a0)
   122  
   123  	var r0 *abcitypes.ResponseFinalizeBlock
   124  	var r1 error
   125  	if rf, ok := ret.Get(0).(func(int64) (*abcitypes.ResponseFinalizeBlock, error)); ok {
   126  		return rf(_a0)
   127  	}
   128  	if rf, ok := ret.Get(0).(func(int64) *abcitypes.ResponseFinalizeBlock); ok {
   129  		r0 = rf(_a0)
   130  	} else {
   131  		if ret.Get(0) != nil {
   132  			r0 = ret.Get(0).(*abcitypes.ResponseFinalizeBlock)
   133  		}
   134  	}
   135  
   136  	if rf, ok := ret.Get(1).(func(int64) error); ok {
   137  		r1 = rf(_a0)
   138  	} else {
   139  		r1 = ret.Error(1)
   140  	}
   141  
   142  	return r0, r1
   143  }
   144  
   145  // LoadFromDBOrGenesisDoc provides a mock function with given fields: _a0
   146  func (_m *Store) LoadFromDBOrGenesisDoc(_a0 *types.GenesisDoc) (state.State, error) {
   147  	ret := _m.Called(_a0)
   148  
   149  	var r0 state.State
   150  	var r1 error
   151  	if rf, ok := ret.Get(0).(func(*types.GenesisDoc) (state.State, error)); ok {
   152  		return rf(_a0)
   153  	}
   154  	if rf, ok := ret.Get(0).(func(*types.GenesisDoc) state.State); ok {
   155  		r0 = rf(_a0)
   156  	} else {
   157  		r0 = ret.Get(0).(state.State)
   158  	}
   159  
   160  	if rf, ok := ret.Get(1).(func(*types.GenesisDoc) error); ok {
   161  		r1 = rf(_a0)
   162  	} else {
   163  		r1 = ret.Error(1)
   164  	}
   165  
   166  	return r0, r1
   167  }
   168  
   169  // LoadFromDBOrGenesisFile provides a mock function with given fields: _a0
   170  func (_m *Store) LoadFromDBOrGenesisFile(_a0 string) (state.State, error) {
   171  	ret := _m.Called(_a0)
   172  
   173  	var r0 state.State
   174  	var r1 error
   175  	if rf, ok := ret.Get(0).(func(string) (state.State, error)); ok {
   176  		return rf(_a0)
   177  	}
   178  	if rf, ok := ret.Get(0).(func(string) state.State); ok {
   179  		r0 = rf(_a0)
   180  	} else {
   181  		r0 = ret.Get(0).(state.State)
   182  	}
   183  
   184  	if rf, ok := ret.Get(1).(func(string) error); ok {
   185  		r1 = rf(_a0)
   186  	} else {
   187  		r1 = ret.Error(1)
   188  	}
   189  
   190  	return r0, r1
   191  }
   192  
   193  // LoadLastFinalizeBlockResponse provides a mock function with given fields: _a0
   194  func (_m *Store) LoadLastFinalizeBlockResponse(_a0 int64) (*abcitypes.ResponseFinalizeBlock, error) {
   195  	ret := _m.Called(_a0)
   196  
   197  	var r0 *abcitypes.ResponseFinalizeBlock
   198  	var r1 error
   199  	if rf, ok := ret.Get(0).(func(int64) (*abcitypes.ResponseFinalizeBlock, error)); ok {
   200  		return rf(_a0)
   201  	}
   202  	if rf, ok := ret.Get(0).(func(int64) *abcitypes.ResponseFinalizeBlock); ok {
   203  		r0 = rf(_a0)
   204  	} else {
   205  		if ret.Get(0) != nil {
   206  			r0 = ret.Get(0).(*abcitypes.ResponseFinalizeBlock)
   207  		}
   208  	}
   209  
   210  	if rf, ok := ret.Get(1).(func(int64) error); ok {
   211  		r1 = rf(_a0)
   212  	} else {
   213  		r1 = ret.Error(1)
   214  	}
   215  
   216  	return r0, r1
   217  }
   218  
   219  // LoadValidators provides a mock function with given fields: _a0
   220  func (_m *Store) LoadValidators(_a0 int64) (*types.ValidatorSet, error) {
   221  	ret := _m.Called(_a0)
   222  
   223  	var r0 *types.ValidatorSet
   224  	var r1 error
   225  	if rf, ok := ret.Get(0).(func(int64) (*types.ValidatorSet, error)); ok {
   226  		return rf(_a0)
   227  	}
   228  	if rf, ok := ret.Get(0).(func(int64) *types.ValidatorSet); ok {
   229  		r0 = rf(_a0)
   230  	} else {
   231  		if ret.Get(0) != nil {
   232  			r0 = ret.Get(0).(*types.ValidatorSet)
   233  		}
   234  	}
   235  
   236  	if rf, ok := ret.Get(1).(func(int64) error); ok {
   237  		r1 = rf(_a0)
   238  	} else {
   239  		r1 = ret.Error(1)
   240  	}
   241  
   242  	return r0, r1
   243  }
   244  
   245  // PruneStates provides a mock function with given fields: _a0, _a1, _a2
   246  func (_m *Store) PruneStates(_a0 int64, _a1 int64, _a2 int64) error {
   247  	ret := _m.Called(_a0, _a1, _a2)
   248  
   249  	var r0 error
   250  	if rf, ok := ret.Get(0).(func(int64, int64, int64) error); ok {
   251  		r0 = rf(_a0, _a1, _a2)
   252  	} else {
   253  		r0 = ret.Error(0)
   254  	}
   255  
   256  	return r0
   257  }
   258  
   259  // Save provides a mock function with given fields: _a0
   260  func (_m *Store) Save(_a0 state.State) error {
   261  	ret := _m.Called(_a0)
   262  
   263  	var r0 error
   264  	if rf, ok := ret.Get(0).(func(state.State) error); ok {
   265  		r0 = rf(_a0)
   266  	} else {
   267  		r0 = ret.Error(0)
   268  	}
   269  
   270  	return r0
   271  }
   272  
   273  // SaveFinalizeBlockResponse provides a mock function with given fields: _a0, _a1
   274  func (_m *Store) SaveFinalizeBlockResponse(_a0 int64, _a1 *abcitypes.ResponseFinalizeBlock) error {
   275  	ret := _m.Called(_a0, _a1)
   276  
   277  	var r0 error
   278  	if rf, ok := ret.Get(0).(func(int64, *abcitypes.ResponseFinalizeBlock) error); ok {
   279  		r0 = rf(_a0, _a1)
   280  	} else {
   281  		r0 = ret.Error(0)
   282  	}
   283  
   284  	return r0
   285  }
   286  
   287  // SetOfflineStateSyncHeight provides a mock function with given fields: height
   288  func (_m *Store) SetOfflineStateSyncHeight(height int64) error {
   289  	ret := _m.Called(height)
   290  
   291  	var r0 error
   292  	if rf, ok := ret.Get(0).(func(int64) error); ok {
   293  		r0 = rf(height)
   294  	} else {
   295  		r0 = ret.Error(0)
   296  	}
   297  
   298  	return r0
   299  }
   300  
   301  type mockConstructorTestingTNewStore interface {
   302  	mock.TestingT
   303  	Cleanup(func())
   304  }
   305  
   306  // NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   307  func NewStore(t mockConstructorTestingTNewStore) *Store {
   308  	mock := &Store{}
   309  	mock.Mock.Test(t)
   310  
   311  	t.Cleanup(func() { mock.AssertExpectations(t) })
   312  
   313  	return mock
   314  }