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.

210 lines
4.3 KiB

  1. // Code generated by mockery. DO NOT EDIT.
  2. package mocks
  3. import (
  4. mock "github.com/stretchr/testify/mock"
  5. types "github.com/tendermint/tendermint/types"
  6. )
  7. // BlockStore is an autogenerated mock type for the BlockStore type
  8. type BlockStore struct {
  9. mock.Mock
  10. }
  11. // Base provides a mock function with given fields:
  12. func (_m *BlockStore) Base() int64 {
  13. ret := _m.Called()
  14. var r0 int64
  15. if rf, ok := ret.Get(0).(func() int64); ok {
  16. r0 = rf()
  17. } else {
  18. r0 = ret.Get(0).(int64)
  19. }
  20. return r0
  21. }
  22. // Height provides a mock function with given fields:
  23. func (_m *BlockStore) Height() int64 {
  24. ret := _m.Called()
  25. var r0 int64
  26. if rf, ok := ret.Get(0).(func() int64); ok {
  27. r0 = rf()
  28. } else {
  29. r0 = ret.Get(0).(int64)
  30. }
  31. return r0
  32. }
  33. // LoadBaseMeta provides a mock function with given fields:
  34. func (_m *BlockStore) LoadBaseMeta() *types.BlockMeta {
  35. ret := _m.Called()
  36. var r0 *types.BlockMeta
  37. if rf, ok := ret.Get(0).(func() *types.BlockMeta); ok {
  38. r0 = rf()
  39. } else {
  40. if ret.Get(0) != nil {
  41. r0 = ret.Get(0).(*types.BlockMeta)
  42. }
  43. }
  44. return r0
  45. }
  46. // LoadBlock provides a mock function with given fields: height
  47. func (_m *BlockStore) LoadBlock(height int64) *types.Block {
  48. ret := _m.Called(height)
  49. var r0 *types.Block
  50. if rf, ok := ret.Get(0).(func(int64) *types.Block); ok {
  51. r0 = rf(height)
  52. } else {
  53. if ret.Get(0) != nil {
  54. r0 = ret.Get(0).(*types.Block)
  55. }
  56. }
  57. return r0
  58. }
  59. // LoadBlockByHash provides a mock function with given fields: hash
  60. func (_m *BlockStore) LoadBlockByHash(hash []byte) *types.Block {
  61. ret := _m.Called(hash)
  62. var r0 *types.Block
  63. if rf, ok := ret.Get(0).(func([]byte) *types.Block); ok {
  64. r0 = rf(hash)
  65. } else {
  66. if ret.Get(0) != nil {
  67. r0 = ret.Get(0).(*types.Block)
  68. }
  69. }
  70. return r0
  71. }
  72. // LoadBlockCommit provides a mock function with given fields: height
  73. func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit {
  74. ret := _m.Called(height)
  75. var r0 *types.Commit
  76. if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok {
  77. r0 = rf(height)
  78. } else {
  79. if ret.Get(0) != nil {
  80. r0 = ret.Get(0).(*types.Commit)
  81. }
  82. }
  83. return r0
  84. }
  85. // LoadBlockMeta provides a mock function with given fields: height
  86. func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta {
  87. ret := _m.Called(height)
  88. var r0 *types.BlockMeta
  89. if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok {
  90. r0 = rf(height)
  91. } else {
  92. if ret.Get(0) != nil {
  93. r0 = ret.Get(0).(*types.BlockMeta)
  94. }
  95. }
  96. return r0
  97. }
  98. // LoadBlockMetaByHash provides a mock function with given fields: hash
  99. func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta {
  100. ret := _m.Called(hash)
  101. var r0 *types.BlockMeta
  102. if rf, ok := ret.Get(0).(func([]byte) *types.BlockMeta); ok {
  103. r0 = rf(hash)
  104. } else {
  105. if ret.Get(0) != nil {
  106. r0 = ret.Get(0).(*types.BlockMeta)
  107. }
  108. }
  109. return r0
  110. }
  111. // LoadBlockPart provides a mock function with given fields: height, index
  112. func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part {
  113. ret := _m.Called(height, index)
  114. var r0 *types.Part
  115. if rf, ok := ret.Get(0).(func(int64, int) *types.Part); ok {
  116. r0 = rf(height, index)
  117. } else {
  118. if ret.Get(0) != nil {
  119. r0 = ret.Get(0).(*types.Part)
  120. }
  121. }
  122. return r0
  123. }
  124. // LoadSeenCommit provides a mock function with given fields:
  125. func (_m *BlockStore) LoadSeenCommit() *types.Commit {
  126. ret := _m.Called()
  127. var r0 *types.Commit
  128. if rf, ok := ret.Get(0).(func() *types.Commit); ok {
  129. r0 = rf()
  130. } else {
  131. if ret.Get(0) != nil {
  132. r0 = ret.Get(0).(*types.Commit)
  133. }
  134. }
  135. return r0
  136. }
  137. // PruneBlocks provides a mock function with given fields: height
  138. func (_m *BlockStore) PruneBlocks(height int64) (uint64, error) {
  139. ret := _m.Called(height)
  140. var r0 uint64
  141. if rf, ok := ret.Get(0).(func(int64) uint64); ok {
  142. r0 = rf(height)
  143. } else {
  144. r0 = ret.Get(0).(uint64)
  145. }
  146. var r1 error
  147. if rf, ok := ret.Get(1).(func(int64) error); ok {
  148. r1 = rf(height)
  149. } else {
  150. r1 = ret.Error(1)
  151. }
  152. return r0, r1
  153. }
  154. // SaveBlock provides a mock function with given fields: block, blockParts, seenCommit
  155. func (_m *BlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) {
  156. _m.Called(block, blockParts, seenCommit)
  157. }
  158. // Size provides a mock function with given fields:
  159. func (_m *BlockStore) Size() int64 {
  160. ret := _m.Called()
  161. var r0 int64
  162. if rf, ok := ret.Get(0).(func() int64); ok {
  163. r0 = rf()
  164. } else {
  165. r0 = ret.Get(0).(int64)
  166. }
  167. return r0
  168. }