You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
3.9 KiB

  1. // Code generated by mockery. DO NOT EDIT.
  2. package mocks
  3. import (
  4. context "context"
  5. abcitypes "github.com/tendermint/tendermint/abci/types"
  6. mempool "github.com/tendermint/tendermint/internal/mempool"
  7. mock "github.com/stretchr/testify/mock"
  8. types "github.com/tendermint/tendermint/types"
  9. )
  10. // Mempool is an autogenerated mock type for the Mempool type
  11. type Mempool struct {
  12. mock.Mock
  13. }
  14. // CheckTx provides a mock function with given fields: ctx, tx, callback, txInfo
  15. func (_m *Mempool) CheckTx(ctx context.Context, tx types.Tx, callback func(*abcitypes.ResponseCheckTx), txInfo mempool.TxInfo) error {
  16. ret := _m.Called(ctx, tx, callback, txInfo)
  17. var r0 error
  18. if rf, ok := ret.Get(0).(func(context.Context, types.Tx, func(*abcitypes.ResponseCheckTx), mempool.TxInfo) error); ok {
  19. r0 = rf(ctx, tx, callback, txInfo)
  20. } else {
  21. r0 = ret.Error(0)
  22. }
  23. return r0
  24. }
  25. // EnableTxsAvailable provides a mock function with given fields:
  26. func (_m *Mempool) EnableTxsAvailable() {
  27. _m.Called()
  28. }
  29. // Flush provides a mock function with given fields:
  30. func (_m *Mempool) Flush() {
  31. _m.Called()
  32. }
  33. // FlushAppConn provides a mock function with given fields: _a0
  34. func (_m *Mempool) FlushAppConn(_a0 context.Context) error {
  35. ret := _m.Called(_a0)
  36. var r0 error
  37. if rf, ok := ret.Get(0).(func(context.Context) error); ok {
  38. r0 = rf(_a0)
  39. } else {
  40. r0 = ret.Error(0)
  41. }
  42. return r0
  43. }
  44. // Lock provides a mock function with given fields:
  45. func (_m *Mempool) Lock() {
  46. _m.Called()
  47. }
  48. // ReapMaxBytesMaxGas provides a mock function with given fields: maxBytes, maxGas
  49. func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs {
  50. ret := _m.Called(maxBytes, maxGas)
  51. var r0 types.Txs
  52. if rf, ok := ret.Get(0).(func(int64, int64) types.Txs); ok {
  53. r0 = rf(maxBytes, maxGas)
  54. } else {
  55. if ret.Get(0) != nil {
  56. r0 = ret.Get(0).(types.Txs)
  57. }
  58. }
  59. return r0
  60. }
  61. // ReapMaxTxs provides a mock function with given fields: max
  62. func (_m *Mempool) ReapMaxTxs(max int) types.Txs {
  63. ret := _m.Called(max)
  64. var r0 types.Txs
  65. if rf, ok := ret.Get(0).(func(int) types.Txs); ok {
  66. r0 = rf(max)
  67. } else {
  68. if ret.Get(0) != nil {
  69. r0 = ret.Get(0).(types.Txs)
  70. }
  71. }
  72. return r0
  73. }
  74. // RemoveTxByKey provides a mock function with given fields: txKey
  75. func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error {
  76. ret := _m.Called(txKey)
  77. var r0 error
  78. if rf, ok := ret.Get(0).(func(types.TxKey) error); ok {
  79. r0 = rf(txKey)
  80. } else {
  81. r0 = ret.Error(0)
  82. }
  83. return r0
  84. }
  85. // Size provides a mock function with given fields:
  86. func (_m *Mempool) Size() int {
  87. ret := _m.Called()
  88. var r0 int
  89. if rf, ok := ret.Get(0).(func() int); ok {
  90. r0 = rf()
  91. } else {
  92. r0 = ret.Get(0).(int)
  93. }
  94. return r0
  95. }
  96. // SizeBytes provides a mock function with given fields:
  97. func (_m *Mempool) SizeBytes() int64 {
  98. ret := _m.Called()
  99. var r0 int64
  100. if rf, ok := ret.Get(0).(func() int64); ok {
  101. r0 = rf()
  102. } else {
  103. r0 = ret.Get(0).(int64)
  104. }
  105. return r0
  106. }
  107. // TxsAvailable provides a mock function with given fields:
  108. func (_m *Mempool) TxsAvailable() <-chan struct{} {
  109. ret := _m.Called()
  110. var r0 <-chan struct{}
  111. if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
  112. r0 = rf()
  113. } else {
  114. if ret.Get(0) != nil {
  115. r0 = ret.Get(0).(<-chan struct{})
  116. }
  117. }
  118. return r0
  119. }
  120. // Unlock provides a mock function with given fields:
  121. func (_m *Mempool) Unlock() {
  122. _m.Called()
  123. }
  124. // Update provides a mock function with given fields: ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn
  125. func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types.Txs, txResults []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc) error {
  126. ret := _m.Called(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn)
  127. var r0 error
  128. if rf, ok := ret.Get(0).(func(context.Context, int64, types.Txs, []*abcitypes.ExecTxResult, mempool.PreCheckFunc, mempool.PostCheckFunc) error); ok {
  129. r0 = rf(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn)
  130. } else {
  131. r0 = ret.Error(0)
  132. }
  133. return r0
  134. }