6 Star 46 Fork 28

Hyperledger/fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
scc_functions.go 26.18 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
// Code generated by counterfeiter. DO NOT EDIT.
package mock
import (
"sync"
"github.com/hyperledger/fabric/common/chaincode"
"github.com/hyperledger/fabric/core/chaincode/lifecycle"
persistence "github.com/hyperledger/fabric/core/chaincode/persistence/intf"
)
type SCCFunctions struct {
ApproveChaincodeDefinitionForOrgStub func(string, string, *lifecycle.ChaincodeDefinition, persistence.PackageID, lifecycle.ReadableState, lifecycle.ReadWritableState) error
approveChaincodeDefinitionForOrgMutex sync.RWMutex
approveChaincodeDefinitionForOrgArgsForCall []struct {
arg1 string
arg2 string
arg3 *lifecycle.ChaincodeDefinition
arg4 persistence.PackageID
arg5 lifecycle.ReadableState
arg6 lifecycle.ReadWritableState
}
approveChaincodeDefinitionForOrgReturns struct {
result1 error
}
approveChaincodeDefinitionForOrgReturnsOnCall map[int]struct {
result1 error
}
CommitChaincodeDefinitionStub func(string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) ([]bool, error)
commitChaincodeDefinitionMutex sync.RWMutex
commitChaincodeDefinitionArgsForCall []struct {
arg1 string
arg2 string
arg3 *lifecycle.ChaincodeDefinition
arg4 lifecycle.ReadWritableState
arg5 []lifecycle.OpaqueState
}
commitChaincodeDefinitionReturns struct {
result1 []bool
result2 error
}
commitChaincodeDefinitionReturnsOnCall map[int]struct {
result1 []bool
result2 error
}
InstallChaincodeStub func([]byte) (*chaincode.InstalledChaincode, error)
installChaincodeMutex sync.RWMutex
installChaincodeArgsForCall []struct {
arg1 []byte
}
installChaincodeReturns struct {
result1 *chaincode.InstalledChaincode
result2 error
}
installChaincodeReturnsOnCall map[int]struct {
result1 *chaincode.InstalledChaincode
result2 error
}
QueryApprovalStatusStub func(string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) ([]bool, error)
queryApprovalStatusMutex sync.RWMutex
queryApprovalStatusArgsForCall []struct {
arg1 string
arg2 string
arg3 *lifecycle.ChaincodeDefinition
arg4 lifecycle.ReadWritableState
arg5 []lifecycle.OpaqueState
}
queryApprovalStatusReturns struct {
result1 []bool
result2 error
}
queryApprovalStatusReturnsOnCall map[int]struct {
result1 []bool
result2 error
}
QueryChaincodeDefinitionStub func(string, lifecycle.ReadableState) (*lifecycle.ChaincodeDefinition, error)
queryChaincodeDefinitionMutex sync.RWMutex
queryChaincodeDefinitionArgsForCall []struct {
arg1 string
arg2 lifecycle.ReadableState
}
queryChaincodeDefinitionReturns struct {
result1 *lifecycle.ChaincodeDefinition
result2 error
}
queryChaincodeDefinitionReturnsOnCall map[int]struct {
result1 *lifecycle.ChaincodeDefinition
result2 error
}
QueryInstalledChaincodeStub func(persistence.PackageID) (*chaincode.InstalledChaincode, error)
queryInstalledChaincodeMutex sync.RWMutex
queryInstalledChaincodeArgsForCall []struct {
arg1 persistence.PackageID
}
queryInstalledChaincodeReturns struct {
result1 *chaincode.InstalledChaincode
result2 error
}
queryInstalledChaincodeReturnsOnCall map[int]struct {
result1 *chaincode.InstalledChaincode
result2 error
}
QueryInstalledChaincodesStub func() ([]chaincode.InstalledChaincode, error)
queryInstalledChaincodesMutex sync.RWMutex
queryInstalledChaincodesArgsForCall []struct {
}
queryInstalledChaincodesReturns struct {
result1 []chaincode.InstalledChaincode
result2 error
}
queryInstalledChaincodesReturnsOnCall map[int]struct {
result1 []chaincode.InstalledChaincode
result2 error
}
QueryNamespaceDefinitionsStub func(lifecycle.RangeableState) (map[string]string, error)
queryNamespaceDefinitionsMutex sync.RWMutex
queryNamespaceDefinitionsArgsForCall []struct {
arg1 lifecycle.RangeableState
}
queryNamespaceDefinitionsReturns struct {
result1 map[string]string
result2 error
}
queryNamespaceDefinitionsReturnsOnCall map[int]struct {
result1 map[string]string
result2 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrg(arg1 string, arg2 string, arg3 *lifecycle.ChaincodeDefinition, arg4 persistence.PackageID, arg5 lifecycle.ReadableState, arg6 lifecycle.ReadWritableState) error {
fake.approveChaincodeDefinitionForOrgMutex.Lock()
ret, specificReturn := fake.approveChaincodeDefinitionForOrgReturnsOnCall[len(fake.approveChaincodeDefinitionForOrgArgsForCall)]
fake.approveChaincodeDefinitionForOrgArgsForCall = append(fake.approveChaincodeDefinitionForOrgArgsForCall, struct {
arg1 string
arg2 string
arg3 *lifecycle.ChaincodeDefinition
arg4 persistence.PackageID
arg5 lifecycle.ReadableState
arg6 lifecycle.ReadWritableState
}{arg1, arg2, arg3, arg4, arg5, arg6})
fake.recordInvocation("ApproveChaincodeDefinitionForOrg", []interface{}{arg1, arg2, arg3, arg4, arg5, arg6})
fake.approveChaincodeDefinitionForOrgMutex.Unlock()
if fake.ApproveChaincodeDefinitionForOrgStub != nil {
return fake.ApproveChaincodeDefinitionForOrgStub(arg1, arg2, arg3, arg4, arg5, arg6)
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.approveChaincodeDefinitionForOrgReturns
return fakeReturns.result1
}
func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrgCallCount() int {
fake.approveChaincodeDefinitionForOrgMutex.RLock()
defer fake.approveChaincodeDefinitionForOrgMutex.RUnlock()
return len(fake.approveChaincodeDefinitionForOrgArgsForCall)
}
func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrgCalls(stub func(string, string, *lifecycle.ChaincodeDefinition, persistence.PackageID, lifecycle.ReadableState, lifecycle.ReadWritableState) error) {
fake.approveChaincodeDefinitionForOrgMutex.Lock()
defer fake.approveChaincodeDefinitionForOrgMutex.Unlock()
fake.ApproveChaincodeDefinitionForOrgStub = stub
}
func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrgArgsForCall(i int) (string, string, *lifecycle.ChaincodeDefinition, persistence.PackageID, lifecycle.ReadableState, lifecycle.ReadWritableState) {
fake.approveChaincodeDefinitionForOrgMutex.RLock()
defer fake.approveChaincodeDefinitionForOrgMutex.RUnlock()
argsForCall := fake.approveChaincodeDefinitionForOrgArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5, argsForCall.arg6
}
func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrgReturns(result1 error) {
fake.approveChaincodeDefinitionForOrgMutex.Lock()
defer fake.approveChaincodeDefinitionForOrgMutex.Unlock()
fake.ApproveChaincodeDefinitionForOrgStub = nil
fake.approveChaincodeDefinitionForOrgReturns = struct {
result1 error
}{result1}
}
func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrgReturnsOnCall(i int, result1 error) {
fake.approveChaincodeDefinitionForOrgMutex.Lock()
defer fake.approveChaincodeDefinitionForOrgMutex.Unlock()
fake.ApproveChaincodeDefinitionForOrgStub = nil
if fake.approveChaincodeDefinitionForOrgReturnsOnCall == nil {
fake.approveChaincodeDefinitionForOrgReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.approveChaincodeDefinitionForOrgReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *SCCFunctions) CommitChaincodeDefinition(arg1 string, arg2 string, arg3 *lifecycle.ChaincodeDefinition, arg4 lifecycle.ReadWritableState, arg5 []lifecycle.OpaqueState) ([]bool, error) {
var arg5Copy []lifecycle.OpaqueState
if arg5 != nil {
arg5Copy = make([]lifecycle.OpaqueState, len(arg5))
copy(arg5Copy, arg5)
}
fake.commitChaincodeDefinitionMutex.Lock()
ret, specificReturn := fake.commitChaincodeDefinitionReturnsOnCall[len(fake.commitChaincodeDefinitionArgsForCall)]
fake.commitChaincodeDefinitionArgsForCall = append(fake.commitChaincodeDefinitionArgsForCall, struct {
arg1 string
arg2 string
arg3 *lifecycle.ChaincodeDefinition
arg4 lifecycle.ReadWritableState
arg5 []lifecycle.OpaqueState
}{arg1, arg2, arg3, arg4, arg5Copy})
fake.recordInvocation("CommitChaincodeDefinition", []interface{}{arg1, arg2, arg3, arg4, arg5Copy})
fake.commitChaincodeDefinitionMutex.Unlock()
if fake.CommitChaincodeDefinitionStub != nil {
return fake.CommitChaincodeDefinitionStub(arg1, arg2, arg3, arg4, arg5)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.commitChaincodeDefinitionReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *SCCFunctions) CommitChaincodeDefinitionCallCount() int {
fake.commitChaincodeDefinitionMutex.RLock()
defer fake.commitChaincodeDefinitionMutex.RUnlock()
return len(fake.commitChaincodeDefinitionArgsForCall)
}
func (fake *SCCFunctions) CommitChaincodeDefinitionCalls(stub func(string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) ([]bool, error)) {
fake.commitChaincodeDefinitionMutex.Lock()
defer fake.commitChaincodeDefinitionMutex.Unlock()
fake.CommitChaincodeDefinitionStub = stub
}
func (fake *SCCFunctions) CommitChaincodeDefinitionArgsForCall(i int) (string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) {
fake.commitChaincodeDefinitionMutex.RLock()
defer fake.commitChaincodeDefinitionMutex.RUnlock()
argsForCall := fake.commitChaincodeDefinitionArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5
}
func (fake *SCCFunctions) CommitChaincodeDefinitionReturns(result1 []bool, result2 error) {
fake.commitChaincodeDefinitionMutex.Lock()
defer fake.commitChaincodeDefinitionMutex.Unlock()
fake.CommitChaincodeDefinitionStub = nil
fake.commitChaincodeDefinitionReturns = struct {
result1 []bool
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) CommitChaincodeDefinitionReturnsOnCall(i int, result1 []bool, result2 error) {
fake.commitChaincodeDefinitionMutex.Lock()
defer fake.commitChaincodeDefinitionMutex.Unlock()
fake.CommitChaincodeDefinitionStub = nil
if fake.commitChaincodeDefinitionReturnsOnCall == nil {
fake.commitChaincodeDefinitionReturnsOnCall = make(map[int]struct {
result1 []bool
result2 error
})
}
fake.commitChaincodeDefinitionReturnsOnCall[i] = struct {
result1 []bool
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) InstallChaincode(arg1 []byte) (*chaincode.InstalledChaincode, error) {
var arg1Copy []byte
if arg1 != nil {
arg1Copy = make([]byte, len(arg1))
copy(arg1Copy, arg1)
}
fake.installChaincodeMutex.Lock()
ret, specificReturn := fake.installChaincodeReturnsOnCall[len(fake.installChaincodeArgsForCall)]
fake.installChaincodeArgsForCall = append(fake.installChaincodeArgsForCall, struct {
arg1 []byte
}{arg1Copy})
fake.recordInvocation("InstallChaincode", []interface{}{arg1Copy})
fake.installChaincodeMutex.Unlock()
if fake.InstallChaincodeStub != nil {
return fake.InstallChaincodeStub(arg1)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.installChaincodeReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *SCCFunctions) InstallChaincodeCallCount() int {
fake.installChaincodeMutex.RLock()
defer fake.installChaincodeMutex.RUnlock()
return len(fake.installChaincodeArgsForCall)
}
func (fake *SCCFunctions) InstallChaincodeCalls(stub func([]byte) (*chaincode.InstalledChaincode, error)) {
fake.installChaincodeMutex.Lock()
defer fake.installChaincodeMutex.Unlock()
fake.InstallChaincodeStub = stub
}
func (fake *SCCFunctions) InstallChaincodeArgsForCall(i int) []byte {
fake.installChaincodeMutex.RLock()
defer fake.installChaincodeMutex.RUnlock()
argsForCall := fake.installChaincodeArgsForCall[i]
return argsForCall.arg1
}
func (fake *SCCFunctions) InstallChaincodeReturns(result1 *chaincode.InstalledChaincode, result2 error) {
fake.installChaincodeMutex.Lock()
defer fake.installChaincodeMutex.Unlock()
fake.InstallChaincodeStub = nil
fake.installChaincodeReturns = struct {
result1 *chaincode.InstalledChaincode
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) InstallChaincodeReturnsOnCall(i int, result1 *chaincode.InstalledChaincode, result2 error) {
fake.installChaincodeMutex.Lock()
defer fake.installChaincodeMutex.Unlock()
fake.InstallChaincodeStub = nil
if fake.installChaincodeReturnsOnCall == nil {
fake.installChaincodeReturnsOnCall = make(map[int]struct {
result1 *chaincode.InstalledChaincode
result2 error
})
}
fake.installChaincodeReturnsOnCall[i] = struct {
result1 *chaincode.InstalledChaincode
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) QueryApprovalStatus(arg1 string, arg2 string, arg3 *lifecycle.ChaincodeDefinition, arg4 lifecycle.ReadWritableState, arg5 []lifecycle.OpaqueState) ([]bool, error) {
var arg5Copy []lifecycle.OpaqueState
if arg5 != nil {
arg5Copy = make([]lifecycle.OpaqueState, len(arg5))
copy(arg5Copy, arg5)
}
fake.queryApprovalStatusMutex.Lock()
ret, specificReturn := fake.queryApprovalStatusReturnsOnCall[len(fake.queryApprovalStatusArgsForCall)]
fake.queryApprovalStatusArgsForCall = append(fake.queryApprovalStatusArgsForCall, struct {
arg1 string
arg2 string
arg3 *lifecycle.ChaincodeDefinition
arg4 lifecycle.ReadWritableState
arg5 []lifecycle.OpaqueState
}{arg1, arg2, arg3, arg4, arg5Copy})
fake.recordInvocation("QueryApprovalStatus", []interface{}{arg1, arg2, arg3, arg4, arg5Copy})
fake.queryApprovalStatusMutex.Unlock()
if fake.QueryApprovalStatusStub != nil {
return fake.QueryApprovalStatusStub(arg1, arg2, arg3, arg4, arg5)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.queryApprovalStatusReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *SCCFunctions) QueryApprovalStatusCallCount() int {
fake.queryApprovalStatusMutex.RLock()
defer fake.queryApprovalStatusMutex.RUnlock()
return len(fake.queryApprovalStatusArgsForCall)
}
func (fake *SCCFunctions) QueryApprovalStatusCalls(stub func(string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) ([]bool, error)) {
fake.queryApprovalStatusMutex.Lock()
defer fake.queryApprovalStatusMutex.Unlock()
fake.QueryApprovalStatusStub = stub
}
func (fake *SCCFunctions) QueryApprovalStatusArgsForCall(i int) (string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) {
fake.queryApprovalStatusMutex.RLock()
defer fake.queryApprovalStatusMutex.RUnlock()
argsForCall := fake.queryApprovalStatusArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5
}
func (fake *SCCFunctions) QueryApprovalStatusReturns(result1 []bool, result2 error) {
fake.queryApprovalStatusMutex.Lock()
defer fake.queryApprovalStatusMutex.Unlock()
fake.QueryApprovalStatusStub = nil
fake.queryApprovalStatusReturns = struct {
result1 []bool
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) QueryApprovalStatusReturnsOnCall(i int, result1 []bool, result2 error) {
fake.queryApprovalStatusMutex.Lock()
defer fake.queryApprovalStatusMutex.Unlock()
fake.QueryApprovalStatusStub = nil
if fake.queryApprovalStatusReturnsOnCall == nil {
fake.queryApprovalStatusReturnsOnCall = make(map[int]struct {
result1 []bool
result2 error
})
}
fake.queryApprovalStatusReturnsOnCall[i] = struct {
result1 []bool
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) QueryChaincodeDefinition(arg1 string, arg2 lifecycle.ReadableState) (*lifecycle.ChaincodeDefinition, error) {
fake.queryChaincodeDefinitionMutex.Lock()
ret, specificReturn := fake.queryChaincodeDefinitionReturnsOnCall[len(fake.queryChaincodeDefinitionArgsForCall)]
fake.queryChaincodeDefinitionArgsForCall = append(fake.queryChaincodeDefinitionArgsForCall, struct {
arg1 string
arg2 lifecycle.ReadableState
}{arg1, arg2})
fake.recordInvocation("QueryChaincodeDefinition", []interface{}{arg1, arg2})
fake.queryChaincodeDefinitionMutex.Unlock()
if fake.QueryChaincodeDefinitionStub != nil {
return fake.QueryChaincodeDefinitionStub(arg1, arg2)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.queryChaincodeDefinitionReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *SCCFunctions) QueryChaincodeDefinitionCallCount() int {
fake.queryChaincodeDefinitionMutex.RLock()
defer fake.queryChaincodeDefinitionMutex.RUnlock()
return len(fake.queryChaincodeDefinitionArgsForCall)
}
func (fake *SCCFunctions) QueryChaincodeDefinitionCalls(stub func(string, lifecycle.ReadableState) (*lifecycle.ChaincodeDefinition, error)) {
fake.queryChaincodeDefinitionMutex.Lock()
defer fake.queryChaincodeDefinitionMutex.Unlock()
fake.QueryChaincodeDefinitionStub = stub
}
func (fake *SCCFunctions) QueryChaincodeDefinitionArgsForCall(i int) (string, lifecycle.ReadableState) {
fake.queryChaincodeDefinitionMutex.RLock()
defer fake.queryChaincodeDefinitionMutex.RUnlock()
argsForCall := fake.queryChaincodeDefinitionArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
}
func (fake *SCCFunctions) QueryChaincodeDefinitionReturns(result1 *lifecycle.ChaincodeDefinition, result2 error) {
fake.queryChaincodeDefinitionMutex.Lock()
defer fake.queryChaincodeDefinitionMutex.Unlock()
fake.QueryChaincodeDefinitionStub = nil
fake.queryChaincodeDefinitionReturns = struct {
result1 *lifecycle.ChaincodeDefinition
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) QueryChaincodeDefinitionReturnsOnCall(i int, result1 *lifecycle.ChaincodeDefinition, result2 error) {
fake.queryChaincodeDefinitionMutex.Lock()
defer fake.queryChaincodeDefinitionMutex.Unlock()
fake.QueryChaincodeDefinitionStub = nil
if fake.queryChaincodeDefinitionReturnsOnCall == nil {
fake.queryChaincodeDefinitionReturnsOnCall = make(map[int]struct {
result1 *lifecycle.ChaincodeDefinition
result2 error
})
}
fake.queryChaincodeDefinitionReturnsOnCall[i] = struct {
result1 *lifecycle.ChaincodeDefinition
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) QueryInstalledChaincode(arg1 persistence.PackageID) (*chaincode.InstalledChaincode, error) {
fake.queryInstalledChaincodeMutex.Lock()
ret, specificReturn := fake.queryInstalledChaincodeReturnsOnCall[len(fake.queryInstalledChaincodeArgsForCall)]
fake.queryInstalledChaincodeArgsForCall = append(fake.queryInstalledChaincodeArgsForCall, struct {
arg1 persistence.PackageID
}{arg1})
fake.recordInvocation("QueryInstalledChaincode", []interface{}{arg1})
fake.queryInstalledChaincodeMutex.Unlock()
if fake.QueryInstalledChaincodeStub != nil {
return fake.QueryInstalledChaincodeStub(arg1)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.queryInstalledChaincodeReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *SCCFunctions) QueryInstalledChaincodeCallCount() int {
fake.queryInstalledChaincodeMutex.RLock()
defer fake.queryInstalledChaincodeMutex.RUnlock()
return len(fake.queryInstalledChaincodeArgsForCall)
}
func (fake *SCCFunctions) QueryInstalledChaincodeCalls(stub func(persistence.PackageID) (*chaincode.InstalledChaincode, error)) {
fake.queryInstalledChaincodeMutex.Lock()
defer fake.queryInstalledChaincodeMutex.Unlock()
fake.QueryInstalledChaincodeStub = stub
}
func (fake *SCCFunctions) QueryInstalledChaincodeArgsForCall(i int) persistence.PackageID {
fake.queryInstalledChaincodeMutex.RLock()
defer fake.queryInstalledChaincodeMutex.RUnlock()
argsForCall := fake.queryInstalledChaincodeArgsForCall[i]
return argsForCall.arg1
}
func (fake *SCCFunctions) QueryInstalledChaincodeReturns(result1 *chaincode.InstalledChaincode, result2 error) {
fake.queryInstalledChaincodeMutex.Lock()
defer fake.queryInstalledChaincodeMutex.Unlock()
fake.QueryInstalledChaincodeStub = nil
fake.queryInstalledChaincodeReturns = struct {
result1 *chaincode.InstalledChaincode
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) QueryInstalledChaincodeReturnsOnCall(i int, result1 *chaincode.InstalledChaincode, result2 error) {
fake.queryInstalledChaincodeMutex.Lock()
defer fake.queryInstalledChaincodeMutex.Unlock()
fake.QueryInstalledChaincodeStub = nil
if fake.queryInstalledChaincodeReturnsOnCall == nil {
fake.queryInstalledChaincodeReturnsOnCall = make(map[int]struct {
result1 *chaincode.InstalledChaincode
result2 error
})
}
fake.queryInstalledChaincodeReturnsOnCall[i] = struct {
result1 *chaincode.InstalledChaincode
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) QueryInstalledChaincodes() ([]chaincode.InstalledChaincode, error) {
fake.queryInstalledChaincodesMutex.Lock()
ret, specificReturn := fake.queryInstalledChaincodesReturnsOnCall[len(fake.queryInstalledChaincodesArgsForCall)]
fake.queryInstalledChaincodesArgsForCall = append(fake.queryInstalledChaincodesArgsForCall, struct {
}{})
fake.recordInvocation("QueryInstalledChaincodes", []interface{}{})
fake.queryInstalledChaincodesMutex.Unlock()
if fake.QueryInstalledChaincodesStub != nil {
return fake.QueryInstalledChaincodesStub()
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.queryInstalledChaincodesReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *SCCFunctions) QueryInstalledChaincodesCallCount() int {
fake.queryInstalledChaincodesMutex.RLock()
defer fake.queryInstalledChaincodesMutex.RUnlock()
return len(fake.queryInstalledChaincodesArgsForCall)
}
func (fake *SCCFunctions) QueryInstalledChaincodesCalls(stub func() ([]chaincode.InstalledChaincode, error)) {
fake.queryInstalledChaincodesMutex.Lock()
defer fake.queryInstalledChaincodesMutex.Unlock()
fake.QueryInstalledChaincodesStub = stub
}
func (fake *SCCFunctions) QueryInstalledChaincodesReturns(result1 []chaincode.InstalledChaincode, result2 error) {
fake.queryInstalledChaincodesMutex.Lock()
defer fake.queryInstalledChaincodesMutex.Unlock()
fake.QueryInstalledChaincodesStub = nil
fake.queryInstalledChaincodesReturns = struct {
result1 []chaincode.InstalledChaincode
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) QueryInstalledChaincodesReturnsOnCall(i int, result1 []chaincode.InstalledChaincode, result2 error) {
fake.queryInstalledChaincodesMutex.Lock()
defer fake.queryInstalledChaincodesMutex.Unlock()
fake.QueryInstalledChaincodesStub = nil
if fake.queryInstalledChaincodesReturnsOnCall == nil {
fake.queryInstalledChaincodesReturnsOnCall = make(map[int]struct {
result1 []chaincode.InstalledChaincode
result2 error
})
}
fake.queryInstalledChaincodesReturnsOnCall[i] = struct {
result1 []chaincode.InstalledChaincode
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) QueryNamespaceDefinitions(arg1 lifecycle.RangeableState) (map[string]string, error) {
fake.queryNamespaceDefinitionsMutex.Lock()
ret, specificReturn := fake.queryNamespaceDefinitionsReturnsOnCall[len(fake.queryNamespaceDefinitionsArgsForCall)]
fake.queryNamespaceDefinitionsArgsForCall = append(fake.queryNamespaceDefinitionsArgsForCall, struct {
arg1 lifecycle.RangeableState
}{arg1})
fake.recordInvocation("QueryNamespaceDefinitions", []interface{}{arg1})
fake.queryNamespaceDefinitionsMutex.Unlock()
if fake.QueryNamespaceDefinitionsStub != nil {
return fake.QueryNamespaceDefinitionsStub(arg1)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.queryNamespaceDefinitionsReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *SCCFunctions) QueryNamespaceDefinitionsCallCount() int {
fake.queryNamespaceDefinitionsMutex.RLock()
defer fake.queryNamespaceDefinitionsMutex.RUnlock()
return len(fake.queryNamespaceDefinitionsArgsForCall)
}
func (fake *SCCFunctions) QueryNamespaceDefinitionsCalls(stub func(lifecycle.RangeableState) (map[string]string, error)) {
fake.queryNamespaceDefinitionsMutex.Lock()
defer fake.queryNamespaceDefinitionsMutex.Unlock()
fake.QueryNamespaceDefinitionsStub = stub
}
func (fake *SCCFunctions) QueryNamespaceDefinitionsArgsForCall(i int) lifecycle.RangeableState {
fake.queryNamespaceDefinitionsMutex.RLock()
defer fake.queryNamespaceDefinitionsMutex.RUnlock()
argsForCall := fake.queryNamespaceDefinitionsArgsForCall[i]
return argsForCall.arg1
}
func (fake *SCCFunctions) QueryNamespaceDefinitionsReturns(result1 map[string]string, result2 error) {
fake.queryNamespaceDefinitionsMutex.Lock()
defer fake.queryNamespaceDefinitionsMutex.Unlock()
fake.QueryNamespaceDefinitionsStub = nil
fake.queryNamespaceDefinitionsReturns = struct {
result1 map[string]string
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) QueryNamespaceDefinitionsReturnsOnCall(i int, result1 map[string]string, result2 error) {
fake.queryNamespaceDefinitionsMutex.Lock()
defer fake.queryNamespaceDefinitionsMutex.Unlock()
fake.QueryNamespaceDefinitionsStub = nil
if fake.queryNamespaceDefinitionsReturnsOnCall == nil {
fake.queryNamespaceDefinitionsReturnsOnCall = make(map[int]struct {
result1 map[string]string
result2 error
})
}
fake.queryNamespaceDefinitionsReturnsOnCall[i] = struct {
result1 map[string]string
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.approveChaincodeDefinitionForOrgMutex.RLock()
defer fake.approveChaincodeDefinitionForOrgMutex.RUnlock()
fake.commitChaincodeDefinitionMutex.RLock()
defer fake.commitChaincodeDefinitionMutex.RUnlock()
fake.installChaincodeMutex.RLock()
defer fake.installChaincodeMutex.RUnlock()
fake.queryApprovalStatusMutex.RLock()
defer fake.queryApprovalStatusMutex.RUnlock()
fake.queryChaincodeDefinitionMutex.RLock()
defer fake.queryChaincodeDefinitionMutex.RUnlock()
fake.queryInstalledChaincodeMutex.RLock()
defer fake.queryInstalledChaincodeMutex.RUnlock()
fake.queryInstalledChaincodesMutex.RLock()
defer fake.queryInstalledChaincodesMutex.RUnlock()
fake.queryNamespaceDefinitionsMutex.RLock()
defer fake.queryNamespaceDefinitionsMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *SCCFunctions) recordInvocation(key string, args []interface{}) {
fake.invocationsMutex.Lock()
defer fake.invocationsMutex.Unlock()
if fake.invocations == nil {
fake.invocations = map[string][][]interface{}{}
}
if fake.invocations[key] == nil {
fake.invocations[key] = [][]interface{}{}
}
fake.invocations[key] = append(fake.invocations[key], args)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hyperledger/fabric.git
git@gitee.com:hyperledger/fabric.git
hyperledger
fabric
fabric
v2.0.0-alpha

搜索帮助