63 Star 183 Fork 3

Gitee 极速下载/hyperledger-fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/hyperledger/fabric
克隆/下载
scc_functions.go 31.91 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849
// Code generated by counterfeiter. DO NOT EDIT.
package mock
import (
"sync"
"github.com/hyperledger/fabric/common/chaincode"
"github.com/hyperledger/fabric/core/chaincode/lifecycle"
)
type SCCFunctions struct {
ApproveChaincodeDefinitionForOrgStub func(string, string, *lifecycle.ChaincodeDefinition, string, lifecycle.ReadableState, lifecycle.ReadWritableState) error
approveChaincodeDefinitionForOrgMutex sync.RWMutex
approveChaincodeDefinitionForOrgArgsForCall []struct {
arg1 string
arg2 string
arg3 *lifecycle.ChaincodeDefinition
arg4 string
arg5 lifecycle.ReadableState
arg6 lifecycle.ReadWritableState
}
approveChaincodeDefinitionForOrgReturns struct {
result1 error
}
approveChaincodeDefinitionForOrgReturnsOnCall map[int]struct {
result1 error
}
CheckCommitReadinessStub func(string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) (map[string]bool, error)
checkCommitReadinessMutex sync.RWMutex
checkCommitReadinessArgsForCall []struct {
arg1 string
arg2 string
arg3 *lifecycle.ChaincodeDefinition
arg4 lifecycle.ReadWritableState
arg5 []lifecycle.OpaqueState
}
checkCommitReadinessReturns struct {
result1 map[string]bool
result2 error
}
checkCommitReadinessReturnsOnCall map[int]struct {
result1 map[string]bool
result2 error
}
CommitChaincodeDefinitionStub func(string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) (map[string]bool, error)
commitChaincodeDefinitionMutex sync.RWMutex
commitChaincodeDefinitionArgsForCall []struct {
arg1 string
arg2 string
arg3 *lifecycle.ChaincodeDefinition
arg4 lifecycle.ReadWritableState
arg5 []lifecycle.OpaqueState
}
commitChaincodeDefinitionReturns struct {
result1 map[string]bool
result2 error
}
commitChaincodeDefinitionReturnsOnCall map[int]struct {
result1 map[string]bool
result2 error
}
GetInstalledChaincodePackageStub func(string) ([]byte, error)
getInstalledChaincodePackageMutex sync.RWMutex
getInstalledChaincodePackageArgsForCall []struct {
arg1 string
}
getInstalledChaincodePackageReturns struct {
result1 []byte
result2 error
}
getInstalledChaincodePackageReturnsOnCall map[int]struct {
result1 []byte
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
}
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(string) (*chaincode.InstalledChaincode, error)
queryInstalledChaincodeMutex sync.RWMutex
queryInstalledChaincodeArgsForCall []struct {
arg1 string
}
queryInstalledChaincodeReturns struct {
result1 *chaincode.InstalledChaincode
result2 error
}
queryInstalledChaincodeReturnsOnCall map[int]struct {
result1 *chaincode.InstalledChaincode
result2 error
}
QueryInstalledChaincodesStub func() []*chaincode.InstalledChaincode
queryInstalledChaincodesMutex sync.RWMutex
queryInstalledChaincodesArgsForCall []struct {
}
queryInstalledChaincodesReturns struct {
result1 []*chaincode.InstalledChaincode
}
queryInstalledChaincodesReturnsOnCall map[int]struct {
result1 []*chaincode.InstalledChaincode
}
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
}
QueryOrgApprovalsStub func(string, *lifecycle.ChaincodeDefinition, []lifecycle.OpaqueState) (map[string]bool, error)
queryOrgApprovalsMutex sync.RWMutex
queryOrgApprovalsArgsForCall []struct {
arg1 string
arg2 *lifecycle.ChaincodeDefinition
arg3 []lifecycle.OpaqueState
}
queryOrgApprovalsReturns struct {
result1 map[string]bool
result2 error
}
queryOrgApprovalsReturnsOnCall map[int]struct {
result1 map[string]bool
result2 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrg(arg1 string, arg2 string, arg3 *lifecycle.ChaincodeDefinition, arg4 string, 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 string
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, string, 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, string, 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) CheckCommitReadiness(arg1 string, arg2 string, arg3 *lifecycle.ChaincodeDefinition, arg4 lifecycle.ReadWritableState, arg5 []lifecycle.OpaqueState) (map[string]bool, error) {
var arg5Copy []lifecycle.OpaqueState
if arg5 != nil {
arg5Copy = make([]lifecycle.OpaqueState, len(arg5))
copy(arg5Copy, arg5)
}
fake.checkCommitReadinessMutex.Lock()
ret, specificReturn := fake.checkCommitReadinessReturnsOnCall[len(fake.checkCommitReadinessArgsForCall)]
fake.checkCommitReadinessArgsForCall = append(fake.checkCommitReadinessArgsForCall, struct {
arg1 string
arg2 string
arg3 *lifecycle.ChaincodeDefinition
arg4 lifecycle.ReadWritableState
arg5 []lifecycle.OpaqueState
}{arg1, arg2, arg3, arg4, arg5Copy})
fake.recordInvocation("CheckCommitReadiness", []interface{}{arg1, arg2, arg3, arg4, arg5Copy})
fake.checkCommitReadinessMutex.Unlock()
if fake.CheckCommitReadinessStub != nil {
return fake.CheckCommitReadinessStub(arg1, arg2, arg3, arg4, arg5)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.checkCommitReadinessReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *SCCFunctions) CheckCommitReadinessCallCount() int {
fake.checkCommitReadinessMutex.RLock()
defer fake.checkCommitReadinessMutex.RUnlock()
return len(fake.checkCommitReadinessArgsForCall)
}
func (fake *SCCFunctions) CheckCommitReadinessCalls(stub func(string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) (map[string]bool, error)) {
fake.checkCommitReadinessMutex.Lock()
defer fake.checkCommitReadinessMutex.Unlock()
fake.CheckCommitReadinessStub = stub
}
func (fake *SCCFunctions) CheckCommitReadinessArgsForCall(i int) (string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) {
fake.checkCommitReadinessMutex.RLock()
defer fake.checkCommitReadinessMutex.RUnlock()
argsForCall := fake.checkCommitReadinessArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5
}
func (fake *SCCFunctions) CheckCommitReadinessReturns(result1 map[string]bool, result2 error) {
fake.checkCommitReadinessMutex.Lock()
defer fake.checkCommitReadinessMutex.Unlock()
fake.CheckCommitReadinessStub = nil
fake.checkCommitReadinessReturns = struct {
result1 map[string]bool
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) CheckCommitReadinessReturnsOnCall(i int, result1 map[string]bool, result2 error) {
fake.checkCommitReadinessMutex.Lock()
defer fake.checkCommitReadinessMutex.Unlock()
fake.CheckCommitReadinessStub = nil
if fake.checkCommitReadinessReturnsOnCall == nil {
fake.checkCommitReadinessReturnsOnCall = make(map[int]struct {
result1 map[string]bool
result2 error
})
}
fake.checkCommitReadinessReturnsOnCall[i] = struct {
result1 map[string]bool
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) CommitChaincodeDefinition(arg1 string, arg2 string, arg3 *lifecycle.ChaincodeDefinition, arg4 lifecycle.ReadWritableState, arg5 []lifecycle.OpaqueState) (map[string]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) (map[string]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 map[string]bool, result2 error) {
fake.commitChaincodeDefinitionMutex.Lock()
defer fake.commitChaincodeDefinitionMutex.Unlock()
fake.CommitChaincodeDefinitionStub = nil
fake.commitChaincodeDefinitionReturns = struct {
result1 map[string]bool
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) CommitChaincodeDefinitionReturnsOnCall(i int, result1 map[string]bool, result2 error) {
fake.commitChaincodeDefinitionMutex.Lock()
defer fake.commitChaincodeDefinitionMutex.Unlock()
fake.CommitChaincodeDefinitionStub = nil
if fake.commitChaincodeDefinitionReturnsOnCall == nil {
fake.commitChaincodeDefinitionReturnsOnCall = make(map[int]struct {
result1 map[string]bool
result2 error
})
}
fake.commitChaincodeDefinitionReturnsOnCall[i] = struct {
result1 map[string]bool
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) GetInstalledChaincodePackage(arg1 string) ([]byte, error) {
fake.getInstalledChaincodePackageMutex.Lock()
ret, specificReturn := fake.getInstalledChaincodePackageReturnsOnCall[len(fake.getInstalledChaincodePackageArgsForCall)]
fake.getInstalledChaincodePackageArgsForCall = append(fake.getInstalledChaincodePackageArgsForCall, struct {
arg1 string
}{arg1})
fake.recordInvocation("GetInstalledChaincodePackage", []interface{}{arg1})
fake.getInstalledChaincodePackageMutex.Unlock()
if fake.GetInstalledChaincodePackageStub != nil {
return fake.GetInstalledChaincodePackageStub(arg1)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.getInstalledChaincodePackageReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *SCCFunctions) GetInstalledChaincodePackageCallCount() int {
fake.getInstalledChaincodePackageMutex.RLock()
defer fake.getInstalledChaincodePackageMutex.RUnlock()
return len(fake.getInstalledChaincodePackageArgsForCall)
}
func (fake *SCCFunctions) GetInstalledChaincodePackageCalls(stub func(string) ([]byte, error)) {
fake.getInstalledChaincodePackageMutex.Lock()
defer fake.getInstalledChaincodePackageMutex.Unlock()
fake.GetInstalledChaincodePackageStub = stub
}
func (fake *SCCFunctions) GetInstalledChaincodePackageArgsForCall(i int) string {
fake.getInstalledChaincodePackageMutex.RLock()
defer fake.getInstalledChaincodePackageMutex.RUnlock()
argsForCall := fake.getInstalledChaincodePackageArgsForCall[i]
return argsForCall.arg1
}
func (fake *SCCFunctions) GetInstalledChaincodePackageReturns(result1 []byte, result2 error) {
fake.getInstalledChaincodePackageMutex.Lock()
defer fake.getInstalledChaincodePackageMutex.Unlock()
fake.GetInstalledChaincodePackageStub = nil
fake.getInstalledChaincodePackageReturns = struct {
result1 []byte
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) GetInstalledChaincodePackageReturnsOnCall(i int, result1 []byte, result2 error) {
fake.getInstalledChaincodePackageMutex.Lock()
defer fake.getInstalledChaincodePackageMutex.Unlock()
fake.GetInstalledChaincodePackageStub = nil
if fake.getInstalledChaincodePackageReturnsOnCall == nil {
fake.getInstalledChaincodePackageReturnsOnCall = make(map[int]struct {
result1 []byte
result2 error
})
}
fake.getInstalledChaincodePackageReturnsOnCall[i] = struct {
result1 []byte
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) 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 string) (*chaincode.InstalledChaincode, error) {
fake.queryInstalledChaincodeMutex.Lock()
ret, specificReturn := fake.queryInstalledChaincodeReturnsOnCall[len(fake.queryInstalledChaincodeArgsForCall)]
fake.queryInstalledChaincodeArgsForCall = append(fake.queryInstalledChaincodeArgsForCall, struct {
arg1 string
}{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(string) (*chaincode.InstalledChaincode, error)) {
fake.queryInstalledChaincodeMutex.Lock()
defer fake.queryInstalledChaincodeMutex.Unlock()
fake.QueryInstalledChaincodeStub = stub
}
func (fake *SCCFunctions) QueryInstalledChaincodeArgsForCall(i int) string {
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 {
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
}
fakeReturns := fake.queryInstalledChaincodesReturns
return fakeReturns.result1
}
func (fake *SCCFunctions) QueryInstalledChaincodesCallCount() int {
fake.queryInstalledChaincodesMutex.RLock()
defer fake.queryInstalledChaincodesMutex.RUnlock()
return len(fake.queryInstalledChaincodesArgsForCall)
}
func (fake *SCCFunctions) QueryInstalledChaincodesCalls(stub func() []*chaincode.InstalledChaincode) {
fake.queryInstalledChaincodesMutex.Lock()
defer fake.queryInstalledChaincodesMutex.Unlock()
fake.QueryInstalledChaincodesStub = stub
}
func (fake *SCCFunctions) QueryInstalledChaincodesReturns(result1 []*chaincode.InstalledChaincode) {
fake.queryInstalledChaincodesMutex.Lock()
defer fake.queryInstalledChaincodesMutex.Unlock()
fake.QueryInstalledChaincodesStub = nil
fake.queryInstalledChaincodesReturns = struct {
result1 []*chaincode.InstalledChaincode
}{result1}
}
func (fake *SCCFunctions) QueryInstalledChaincodesReturnsOnCall(i int, result1 []*chaincode.InstalledChaincode) {
fake.queryInstalledChaincodesMutex.Lock()
defer fake.queryInstalledChaincodesMutex.Unlock()
fake.QueryInstalledChaincodesStub = nil
if fake.queryInstalledChaincodesReturnsOnCall == nil {
fake.queryInstalledChaincodesReturnsOnCall = make(map[int]struct {
result1 []*chaincode.InstalledChaincode
})
}
fake.queryInstalledChaincodesReturnsOnCall[i] = struct {
result1 []*chaincode.InstalledChaincode
}{result1}
}
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) QueryOrgApprovals(arg1 string, arg2 *lifecycle.ChaincodeDefinition, arg3 []lifecycle.OpaqueState) (map[string]bool, error) {
var arg3Copy []lifecycle.OpaqueState
if arg3 != nil {
arg3Copy = make([]lifecycle.OpaqueState, len(arg3))
copy(arg3Copy, arg3)
}
fake.queryOrgApprovalsMutex.Lock()
ret, specificReturn := fake.queryOrgApprovalsReturnsOnCall[len(fake.queryOrgApprovalsArgsForCall)]
fake.queryOrgApprovalsArgsForCall = append(fake.queryOrgApprovalsArgsForCall, struct {
arg1 string
arg2 *lifecycle.ChaincodeDefinition
arg3 []lifecycle.OpaqueState
}{arg1, arg2, arg3Copy})
fake.recordInvocation("QueryOrgApprovals", []interface{}{arg1, arg2, arg3Copy})
fake.queryOrgApprovalsMutex.Unlock()
if fake.QueryOrgApprovalsStub != nil {
return fake.QueryOrgApprovalsStub(arg1, arg2, arg3)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.queryOrgApprovalsReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *SCCFunctions) QueryOrgApprovalsCallCount() int {
fake.queryOrgApprovalsMutex.RLock()
defer fake.queryOrgApprovalsMutex.RUnlock()
return len(fake.queryOrgApprovalsArgsForCall)
}
func (fake *SCCFunctions) QueryOrgApprovalsCalls(stub func(string, *lifecycle.ChaincodeDefinition, []lifecycle.OpaqueState) (map[string]bool, error)) {
fake.queryOrgApprovalsMutex.Lock()
defer fake.queryOrgApprovalsMutex.Unlock()
fake.QueryOrgApprovalsStub = stub
}
func (fake *SCCFunctions) QueryOrgApprovalsArgsForCall(i int) (string, *lifecycle.ChaincodeDefinition, []lifecycle.OpaqueState) {
fake.queryOrgApprovalsMutex.RLock()
defer fake.queryOrgApprovalsMutex.RUnlock()
argsForCall := fake.queryOrgApprovalsArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}
func (fake *SCCFunctions) QueryOrgApprovalsReturns(result1 map[string]bool, result2 error) {
fake.queryOrgApprovalsMutex.Lock()
defer fake.queryOrgApprovalsMutex.Unlock()
fake.QueryOrgApprovalsStub = nil
fake.queryOrgApprovalsReturns = struct {
result1 map[string]bool
result2 error
}{result1, result2}
}
func (fake *SCCFunctions) QueryOrgApprovalsReturnsOnCall(i int, result1 map[string]bool, result2 error) {
fake.queryOrgApprovalsMutex.Lock()
defer fake.queryOrgApprovalsMutex.Unlock()
fake.QueryOrgApprovalsStub = nil
if fake.queryOrgApprovalsReturnsOnCall == nil {
fake.queryOrgApprovalsReturnsOnCall = make(map[int]struct {
result1 map[string]bool
result2 error
})
}
fake.queryOrgApprovalsReturnsOnCall[i] = struct {
result1 map[string]bool
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.checkCommitReadinessMutex.RLock()
defer fake.checkCommitReadinessMutex.RUnlock()
fake.commitChaincodeDefinitionMutex.RLock()
defer fake.commitChaincodeDefinitionMutex.RUnlock()
fake.getInstalledChaincodePackageMutex.RLock()
defer fake.getInstalledChaincodePackageMutex.RUnlock()
fake.installChaincodeMutex.RLock()
defer fake.installChaincodeMutex.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()
fake.queryOrgApprovalsMutex.RLock()
defer fake.queryOrgApprovalsMutex.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 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/mirrors/hyperledger-fabric.git
git@gitee.com:mirrors/hyperledger-fabric.git
mirrors
hyperledger-fabric
hyperledger-fabric
v2.1.0

搜索帮助