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.

194 lines
4.0 KiB

  1. // Code generated by mockery 2.7.5. 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. // LoadBlockPart provides a mock function with given fields: height, index
  99. func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part {
  100. ret := _m.Called(height, index)
  101. var r0 *types.Part
  102. if rf, ok := ret.Get(0).(func(int64, int) *types.Part); ok {
  103. r0 = rf(height, index)
  104. } else {
  105. if ret.Get(0) != nil {
  106. r0 = ret.Get(0).(*types.Part)
  107. }
  108. }
  109. return r0
  110. }
  111. // LoadSeenCommit provides a mock function with given fields: height
  112. func (_m *BlockStore) LoadSeenCommit(height int64) *types.Commit {
  113. ret := _m.Called(height)
  114. var r0 *types.Commit
  115. if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok {
  116. r0 = rf(height)
  117. } else {
  118. if ret.Get(0) != nil {
  119. r0 = ret.Get(0).(*types.Commit)
  120. }
  121. }
  122. return r0
  123. }
  124. // PruneBlocks provides a mock function with given fields: height
  125. func (_m *BlockStore) PruneBlocks(height int64) (uint64, error) {
  126. ret := _m.Called(height)
  127. var r0 uint64
  128. if rf, ok := ret.Get(0).(func(int64) uint64); ok {
  129. r0 = rf(height)
  130. } else {
  131. r0 = ret.Get(0).(uint64)
  132. }
  133. var r1 error
  134. if rf, ok := ret.Get(1).(func(int64) error); ok {
  135. r1 = rf(height)
  136. } else {
  137. r1 = ret.Error(1)
  138. }
  139. return r0, r1
  140. }
  141. // SaveBlock provides a mock function with given fields: block, blockParts, seenCommit
  142. func (_m *BlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) {
  143. _m.Called(block, blockParts, seenCommit)
  144. }
  145. // Size provides a mock function with given fields:
  146. func (_m *BlockStore) Size() int64 {
  147. ret := _m.Called()
  148. var r0 int64
  149. if rf, ok := ret.Get(0).(func() int64); ok {
  150. r0 = rf()
  151. } else {
  152. r0 = ret.Get(0).(int64)
  153. }
  154. return r0
  155. }