github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/internal/mempool/mocks/mempool.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	abcitypes "github.com/ari-anchor/sei-tendermint/abci/types"
     9  
    10  	mempool "github.com/ari-anchor/sei-tendermint/internal/mempool"
    11  
    12  	mock "github.com/stretchr/testify/mock"
    13  
    14  	types "github.com/ari-anchor/sei-tendermint/types"
    15  )
    16  
    17  // Mempool is an autogenerated mock type for the Mempool type
    18  type Mempool struct {
    19  	mock.Mock
    20  }
    21  
    22  // CheckTx provides a mock function with given fields: ctx, tx, callback, txInfo
    23  func (_m *Mempool) CheckTx(ctx context.Context, tx types.Tx, callback func(*abcitypes.ResponseCheckTx), txInfo mempool.TxInfo) error {
    24  	ret := _m.Called(ctx, tx, callback, txInfo)
    25  
    26  	var r0 error
    27  	if rf, ok := ret.Get(0).(func(context.Context, types.Tx, func(*abcitypes.ResponseCheckTx), mempool.TxInfo) error); ok {
    28  		r0 = rf(ctx, tx, callback, txInfo)
    29  	} else {
    30  		r0 = ret.Error(0)
    31  	}
    32  
    33  	return r0
    34  }
    35  
    36  // EnableTxsAvailable provides a mock function with given fields:
    37  func (_m *Mempool) EnableTxsAvailable() {
    38  	_m.Called()
    39  }
    40  
    41  // Flush provides a mock function with given fields:
    42  func (_m *Mempool) Flush() {
    43  	_m.Called()
    44  }
    45  
    46  // FlushAppConn provides a mock function with given fields: _a0
    47  func (_m *Mempool) FlushAppConn(_a0 context.Context) error {
    48  	ret := _m.Called(_a0)
    49  
    50  	var r0 error
    51  	if rf, ok := ret.Get(0).(func(context.Context) error); ok {
    52  		r0 = rf(_a0)
    53  	} else {
    54  		r0 = ret.Error(0)
    55  	}
    56  
    57  	return r0
    58  }
    59  
    60  // GetTxsForKeys provides a mock function with given fields: txKeys
    61  func (_m *Mempool) GetTxsForKeys(txKeys []types.TxKey) types.Txs {
    62  	ret := _m.Called(txKeys)
    63  
    64  	var r0 types.Txs
    65  	if rf, ok := ret.Get(0).(func([]types.TxKey) types.Txs); ok {
    66  		r0 = rf(txKeys)
    67  	} else {
    68  		if ret.Get(0) != nil {
    69  			r0 = ret.Get(0).(types.Txs)
    70  		}
    71  	}
    72  
    73  	return r0
    74  }
    75  
    76  // HasTx provides a mock function with given fields: txKey
    77  func (_m *Mempool) HasTx(txKey types.TxKey) bool {
    78  	ret := _m.Called(txKey)
    79  
    80  	var r0 bool
    81  	if rf, ok := ret.Get(0).(func(types.TxKey) bool); ok {
    82  		r0 = rf(txKey)
    83  	} else {
    84  		r0 = ret.Get(0).(bool)
    85  	}
    86  
    87  	return r0
    88  }
    89  
    90  // Lock provides a mock function with given fields:
    91  func (_m *Mempool) Lock() {
    92  	_m.Called()
    93  }
    94  
    95  // ReapMaxBytesMaxGas provides a mock function with given fields: maxBytes, maxGas
    96  func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs {
    97  	ret := _m.Called(maxBytes, maxGas)
    98  
    99  	var r0 types.Txs
   100  	if rf, ok := ret.Get(0).(func(int64, int64) types.Txs); ok {
   101  		r0 = rf(maxBytes, maxGas)
   102  	} else {
   103  		if ret.Get(0) != nil {
   104  			r0 = ret.Get(0).(types.Txs)
   105  		}
   106  	}
   107  
   108  	return r0
   109  }
   110  
   111  // ReapMaxTxs provides a mock function with given fields: max
   112  func (_m *Mempool) ReapMaxTxs(max int) types.Txs {
   113  	ret := _m.Called(max)
   114  
   115  	var r0 types.Txs
   116  	if rf, ok := ret.Get(0).(func(int) types.Txs); ok {
   117  		r0 = rf(max)
   118  	} else {
   119  		if ret.Get(0) != nil {
   120  			r0 = ret.Get(0).(types.Txs)
   121  		}
   122  	}
   123  
   124  	return r0
   125  }
   126  
   127  // RemoveTxByKey provides a mock function with given fields: txKey
   128  func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error {
   129  	ret := _m.Called(txKey)
   130  
   131  	var r0 error
   132  	if rf, ok := ret.Get(0).(func(types.TxKey) error); ok {
   133  		r0 = rf(txKey)
   134  	} else {
   135  		r0 = ret.Error(0)
   136  	}
   137  
   138  	return r0
   139  }
   140  
   141  // Size provides a mock function with given fields:
   142  func (_m *Mempool) Size() int {
   143  	ret := _m.Called()
   144  
   145  	var r0 int
   146  	if rf, ok := ret.Get(0).(func() int); ok {
   147  		r0 = rf()
   148  	} else {
   149  		r0 = ret.Get(0).(int)
   150  	}
   151  
   152  	return r0
   153  }
   154  
   155  // SizeBytes provides a mock function with given fields:
   156  func (_m *Mempool) SizeBytes() int64 {
   157  	ret := _m.Called()
   158  
   159  	var r0 int64
   160  	if rf, ok := ret.Get(0).(func() int64); ok {
   161  		r0 = rf()
   162  	} else {
   163  		r0 = ret.Get(0).(int64)
   164  	}
   165  
   166  	return r0
   167  }
   168  
   169  // TxStore provides a mock function with given fields:
   170  func (_m *Mempool) TxStore() *mempool.TxStore {
   171  	ret := _m.Called()
   172  
   173  	var r0 *mempool.TxStore
   174  	if rf, ok := ret.Get(0).(func() *mempool.TxStore); ok {
   175  		r0 = rf()
   176  	} else {
   177  		if ret.Get(0) != nil {
   178  			r0 = ret.Get(0).(*mempool.TxStore)
   179  		}
   180  	}
   181  
   182  	return r0
   183  }
   184  
   185  // TxsAvailable provides a mock function with given fields:
   186  func (_m *Mempool) TxsAvailable() <-chan struct{} {
   187  	ret := _m.Called()
   188  
   189  	var r0 <-chan struct{}
   190  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
   191  		r0 = rf()
   192  	} else {
   193  		if ret.Get(0) != nil {
   194  			r0 = ret.Get(0).(<-chan struct{})
   195  		}
   196  	}
   197  
   198  	return r0
   199  }
   200  
   201  // Unlock provides a mock function with given fields:
   202  func (_m *Mempool) Unlock() {
   203  	_m.Called()
   204  }
   205  
   206  // Update provides a mock function with given fields: ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck
   207  func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types.Txs, txResults []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc, recheck bool) error {
   208  	ret := _m.Called(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck)
   209  
   210  	var r0 error
   211  	if rf, ok := ret.Get(0).(func(context.Context, int64, types.Txs, []*abcitypes.ExecTxResult, mempool.PreCheckFunc, mempool.PostCheckFunc, bool) error); ok {
   212  		r0 = rf(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck)
   213  	} else {
   214  		r0 = ret.Error(0)
   215  	}
   216  
   217  	return r0
   218  }
   219  
   220  type mockConstructorTestingTNewMempool interface {
   221  	mock.TestingT
   222  	Cleanup(func())
   223  }
   224  
   225  // NewMempool creates a new instance of Mempool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   226  func NewMempool(t mockConstructorTestingTNewMempool) *Mempool {
   227  	mock := &Mempool{}
   228  	mock.Mock.Test(t)
   229  
   230  	t.Cleanup(func() { mock.AssertExpectations(t) })
   231  
   232  	return mock
   233  }