Fetch the repository succeeded.
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import common "github.com/hyperledger/fabric/protos/common"
import ledger "github.com/hyperledger/fabric/core/ledger"
import mock "github.com/stretchr/testify/mock"
// Committer is an autogenerated mock type for the Committer type
type Committer struct {
mock.Mock
}
// Close provides a mock function with given fields:
func (_m *Committer) Close() {
_m.Called()
}
// CommitPvtDataOfOldBlocks provides a mock function with given fields: blockPvtData
func (_m *Committer) CommitPvtDataOfOldBlocks(blockPvtData []*ledger.BlockPvtData) ([]*ledger.PvtdataHashMismatch, error) {
ret := _m.Called(blockPvtData)
var r0 []*ledger.PvtdataHashMismatch
if rf, ok := ret.Get(0).(func([]*ledger.BlockPvtData) []*ledger.PvtdataHashMismatch); ok {
r0 = rf(blockPvtData)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*ledger.PvtdataHashMismatch)
}
}
var r1 error
if rf, ok := ret.Get(1).(func([]*ledger.BlockPvtData) error); ok {
r1 = rf(blockPvtData)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CommitWithPvtData provides a mock function with given fields: blockAndPvtData, commitOpts
func (_m *Committer) CommitWithPvtData(blockAndPvtData *ledger.BlockAndPvtData, commitOpts *ledger.CommitOptions) error {
ret := _m.Called(blockAndPvtData, commitOpts)
var r0 error
if rf, ok := ret.Get(0).(func(*ledger.BlockAndPvtData, *ledger.CommitOptions) error); ok {
r0 = rf(blockAndPvtData, commitOpts)
} else {
r0 = ret.Error(0)
}
return r0
}
// DoesPvtDataInfoExistInLedger provides a mock function with given fields: blockNum
func (_m *Committer) DoesPvtDataInfoExistInLedger(blockNum uint64) (bool, error) {
ret := _m.Called(blockNum)
var r0 bool
if rf, ok := ret.Get(0).(func(uint64) bool); ok {
r0 = rf(blockNum)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(uint64) error); ok {
r1 = rf(blockNum)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetBlocks provides a mock function with given fields: blockSeqs
func (_m *Committer) GetBlocks(blockSeqs []uint64) []*common.Block {
ret := _m.Called(blockSeqs)
var r0 []*common.Block
if rf, ok := ret.Get(0).(func([]uint64) []*common.Block); ok {
r0 = rf(blockSeqs)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*common.Block)
}
}
return r0
}
// GetConfigHistoryRetriever provides a mock function with given fields:
func (_m *Committer) GetConfigHistoryRetriever() (ledger.ConfigHistoryRetriever, error) {
ret := _m.Called()
var r0 ledger.ConfigHistoryRetriever
if rf, ok := ret.Get(0).(func() ledger.ConfigHistoryRetriever); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(ledger.ConfigHistoryRetriever)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetMissingPvtDataTracker provides a mock function with given fields:
func (_m *Committer) GetMissingPvtDataTracker() (ledger.MissingPvtDataTracker, error) {
ret := _m.Called()
var r0 ledger.MissingPvtDataTracker
if rf, ok := ret.Get(0).(func() ledger.MissingPvtDataTracker); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(ledger.MissingPvtDataTracker)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetPvtDataAndBlockByNum provides a mock function with given fields: seqNum
func (_m *Committer) GetPvtDataAndBlockByNum(seqNum uint64) (*ledger.BlockAndPvtData, error) {
ret := _m.Called(seqNum)
var r0 *ledger.BlockAndPvtData
if rf, ok := ret.Get(0).(func(uint64) *ledger.BlockAndPvtData); ok {
r0 = rf(seqNum)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ledger.BlockAndPvtData)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(uint64) error); ok {
r1 = rf(seqNum)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetPvtDataByNum provides a mock function with given fields: blockNum, filter
func (_m *Committer) GetPvtDataByNum(blockNum uint64, filter ledger.PvtNsCollFilter) ([]*ledger.TxPvtData, error) {
ret := _m.Called(blockNum, filter)
var r0 []*ledger.TxPvtData
if rf, ok := ret.Get(0).(func(uint64, ledger.PvtNsCollFilter) []*ledger.TxPvtData); ok {
r0 = rf(blockNum, filter)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*ledger.TxPvtData)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(uint64, ledger.PvtNsCollFilter) error); ok {
r1 = rf(blockNum, filter)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// LedgerHeight provides a mock function with given fields:
func (_m *Committer) LedgerHeight() (uint64, error) {
ret := _m.Called()
var r0 uint64
if rf, ok := ret.Get(0).(func() uint64); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(uint64)
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。