github.com/Hnampk/fabric@v2.1.1+incompatible/gossip/privdata/mocks/committer.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import common "github.com/hyperledger/fabric-protos-go/common"
     6  import ledger "github.com/hyperledger/fabric/core/ledger"
     7  import mock "github.com/stretchr/testify/mock"
     8  
     9  // Committer is an autogenerated mock type for the Committer type
    10  type Committer struct {
    11  	mock.Mock
    12  }
    13  
    14  // Close provides a mock function with given fields:
    15  func (_m *Committer) Close() {
    16  	_m.Called()
    17  }
    18  
    19  // CommitLegacy provides a mock function with given fields: blockAndPvtData, commitOpts
    20  func (_m *Committer) CommitLegacy(blockAndPvtData *ledger.BlockAndPvtData, commitOpts *ledger.CommitOptions) error {
    21  	ret := _m.Called(blockAndPvtData, commitOpts)
    22  
    23  	var r0 error
    24  	if rf, ok := ret.Get(0).(func(*ledger.BlockAndPvtData, *ledger.CommitOptions) error); ok {
    25  		r0 = rf(blockAndPvtData, commitOpts)
    26  	} else {
    27  		r0 = ret.Error(0)
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // CommitPvtDataOfOldBlocks provides a mock function with given fields: reconciledPvtdata
    34  func (_m *Committer) CommitPvtDataOfOldBlocks(reconciledPvtdata []*ledger.ReconciledPvtdata) ([]*ledger.PvtdataHashMismatch, error) {
    35  	ret := _m.Called(reconciledPvtdata)
    36  
    37  	var r0 []*ledger.PvtdataHashMismatch
    38  	if rf, ok := ret.Get(0).(func([]*ledger.ReconciledPvtdata) []*ledger.PvtdataHashMismatch); ok {
    39  		r0 = rf(reconciledPvtdata)
    40  	} else {
    41  		if ret.Get(0) != nil {
    42  			r0 = ret.Get(0).([]*ledger.PvtdataHashMismatch)
    43  		}
    44  	}
    45  
    46  	var r1 error
    47  	if rf, ok := ret.Get(1).(func([]*ledger.ReconciledPvtdata) error); ok {
    48  		r1 = rf(reconciledPvtdata)
    49  	} else {
    50  		r1 = ret.Error(1)
    51  	}
    52  
    53  	return r0, r1
    54  }
    55  
    56  // DoesPvtDataInfoExistInLedger provides a mock function with given fields: blockNum
    57  func (_m *Committer) DoesPvtDataInfoExistInLedger(blockNum uint64) (bool, error) {
    58  	ret := _m.Called(blockNum)
    59  
    60  	var r0 bool
    61  	if rf, ok := ret.Get(0).(func(uint64) bool); ok {
    62  		r0 = rf(blockNum)
    63  	} else {
    64  		r0 = ret.Get(0).(bool)
    65  	}
    66  
    67  	var r1 error
    68  	if rf, ok := ret.Get(1).(func(uint64) error); ok {
    69  		r1 = rf(blockNum)
    70  	} else {
    71  		r1 = ret.Error(1)
    72  	}
    73  
    74  	return r0, r1
    75  }
    76  
    77  // GetBlocks provides a mock function with given fields: blockSeqs
    78  func (_m *Committer) GetBlocks(blockSeqs []uint64) []*common.Block {
    79  	ret := _m.Called(blockSeqs)
    80  
    81  	var r0 []*common.Block
    82  	if rf, ok := ret.Get(0).(func([]uint64) []*common.Block); ok {
    83  		r0 = rf(blockSeqs)
    84  	} else {
    85  		if ret.Get(0) != nil {
    86  			r0 = ret.Get(0).([]*common.Block)
    87  		}
    88  	}
    89  
    90  	return r0
    91  }
    92  
    93  // GetConfigHistoryRetriever provides a mock function with given fields:
    94  func (_m *Committer) GetConfigHistoryRetriever() (ledger.ConfigHistoryRetriever, error) {
    95  	ret := _m.Called()
    96  
    97  	var r0 ledger.ConfigHistoryRetriever
    98  	if rf, ok := ret.Get(0).(func() ledger.ConfigHistoryRetriever); ok {
    99  		r0 = rf()
   100  	} else {
   101  		if ret.Get(0) != nil {
   102  			r0 = ret.Get(0).(ledger.ConfigHistoryRetriever)
   103  		}
   104  	}
   105  
   106  	var r1 error
   107  	if rf, ok := ret.Get(1).(func() error); ok {
   108  		r1 = rf()
   109  	} else {
   110  		r1 = ret.Error(1)
   111  	}
   112  
   113  	return r0, r1
   114  }
   115  
   116  // GetMissingPvtDataTracker provides a mock function with given fields:
   117  func (_m *Committer) GetMissingPvtDataTracker() (ledger.MissingPvtDataTracker, error) {
   118  	ret := _m.Called()
   119  
   120  	var r0 ledger.MissingPvtDataTracker
   121  	if rf, ok := ret.Get(0).(func() ledger.MissingPvtDataTracker); ok {
   122  		r0 = rf()
   123  	} else {
   124  		if ret.Get(0) != nil {
   125  			r0 = ret.Get(0).(ledger.MissingPvtDataTracker)
   126  		}
   127  	}
   128  
   129  	var r1 error
   130  	if rf, ok := ret.Get(1).(func() error); ok {
   131  		r1 = rf()
   132  	} else {
   133  		r1 = ret.Error(1)
   134  	}
   135  
   136  	return r0, r1
   137  }
   138  
   139  // GetPvtDataAndBlockByNum provides a mock function with given fields: seqNum
   140  func (_m *Committer) GetPvtDataAndBlockByNum(seqNum uint64) (*ledger.BlockAndPvtData, error) {
   141  	ret := _m.Called(seqNum)
   142  
   143  	var r0 *ledger.BlockAndPvtData
   144  	if rf, ok := ret.Get(0).(func(uint64) *ledger.BlockAndPvtData); ok {
   145  		r0 = rf(seqNum)
   146  	} else {
   147  		if ret.Get(0) != nil {
   148  			r0 = ret.Get(0).(*ledger.BlockAndPvtData)
   149  		}
   150  	}
   151  
   152  	var r1 error
   153  	if rf, ok := ret.Get(1).(func(uint64) error); ok {
   154  		r1 = rf(seqNum)
   155  	} else {
   156  		r1 = ret.Error(1)
   157  	}
   158  
   159  	return r0, r1
   160  }
   161  
   162  // GetPvtDataByNum provides a mock function with given fields: blockNum, filter
   163  func (_m *Committer) GetPvtDataByNum(blockNum uint64, filter ledger.PvtNsCollFilter) ([]*ledger.TxPvtData, error) {
   164  	ret := _m.Called(blockNum, filter)
   165  
   166  	var r0 []*ledger.TxPvtData
   167  	if rf, ok := ret.Get(0).(func(uint64, ledger.PvtNsCollFilter) []*ledger.TxPvtData); ok {
   168  		r0 = rf(blockNum, filter)
   169  	} else {
   170  		if ret.Get(0) != nil {
   171  			r0 = ret.Get(0).([]*ledger.TxPvtData)
   172  		}
   173  	}
   174  
   175  	var r1 error
   176  	if rf, ok := ret.Get(1).(func(uint64, ledger.PvtNsCollFilter) error); ok {
   177  		r1 = rf(blockNum, filter)
   178  	} else {
   179  		r1 = ret.Error(1)
   180  	}
   181  
   182  	return r0, r1
   183  }
   184  
   185  // LedgerHeight provides a mock function with given fields:
   186  func (_m *Committer) LedgerHeight() (uint64, error) {
   187  	ret := _m.Called()
   188  
   189  	var r0 uint64
   190  	if rf, ok := ret.Get(0).(func() uint64); ok {
   191  		r0 = rf()
   192  	} else {
   193  		r0 = ret.Get(0).(uint64)
   194  	}
   195  
   196  	var r1 error
   197  	if rf, ok := ret.Get(1).(func() error); ok {
   198  		r1 = rf()
   199  	} else {
   200  		r1 = ret.Error(1)
   201  	}
   202  
   203  	return r0, r1
   204  }