gitlab.com/gpdionisio/tendermint@v0.34.19-dev2/state/mocks/block_store.go (about)

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