github.com/osdi23p228/fabric@v0.0.0-20221218062954-77808885f5db/core/chaincode/lifecycle/mock/scc_functions.go (about) 1 // Code generated by counterfeiter. DO NOT EDIT. 2 package mock 3 4 import ( 5 "sync" 6 7 "github.com/osdi23p228/fabric/common/chaincode" 8 "github.com/osdi23p228/fabric/core/chaincode/lifecycle" 9 ) 10 11 type SCCFunctions struct { 12 ApproveChaincodeDefinitionForOrgStub func(string, string, *lifecycle.ChaincodeDefinition, string, lifecycle.ReadableState, lifecycle.ReadWritableState) error 13 approveChaincodeDefinitionForOrgMutex sync.RWMutex 14 approveChaincodeDefinitionForOrgArgsForCall []struct { 15 arg1 string 16 arg2 string 17 arg3 *lifecycle.ChaincodeDefinition 18 arg4 string 19 arg5 lifecycle.ReadableState 20 arg6 lifecycle.ReadWritableState 21 } 22 approveChaincodeDefinitionForOrgReturns struct { 23 result1 error 24 } 25 approveChaincodeDefinitionForOrgReturnsOnCall map[int]struct { 26 result1 error 27 } 28 CheckCommitReadinessStub func(string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) (map[string]bool, error) 29 checkCommitReadinessMutex sync.RWMutex 30 checkCommitReadinessArgsForCall []struct { 31 arg1 string 32 arg2 string 33 arg3 *lifecycle.ChaincodeDefinition 34 arg4 lifecycle.ReadWritableState 35 arg5 []lifecycle.OpaqueState 36 } 37 checkCommitReadinessReturns struct { 38 result1 map[string]bool 39 result2 error 40 } 41 checkCommitReadinessReturnsOnCall map[int]struct { 42 result1 map[string]bool 43 result2 error 44 } 45 CommitChaincodeDefinitionStub func(string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) (map[string]bool, error) 46 commitChaincodeDefinitionMutex sync.RWMutex 47 commitChaincodeDefinitionArgsForCall []struct { 48 arg1 string 49 arg2 string 50 arg3 *lifecycle.ChaincodeDefinition 51 arg4 lifecycle.ReadWritableState 52 arg5 []lifecycle.OpaqueState 53 } 54 commitChaincodeDefinitionReturns struct { 55 result1 map[string]bool 56 result2 error 57 } 58 commitChaincodeDefinitionReturnsOnCall map[int]struct { 59 result1 map[string]bool 60 result2 error 61 } 62 GetInstalledChaincodePackageStub func(string) ([]byte, error) 63 getInstalledChaincodePackageMutex sync.RWMutex 64 getInstalledChaincodePackageArgsForCall []struct { 65 arg1 string 66 } 67 getInstalledChaincodePackageReturns struct { 68 result1 []byte 69 result2 error 70 } 71 getInstalledChaincodePackageReturnsOnCall map[int]struct { 72 result1 []byte 73 result2 error 74 } 75 InstallChaincodeStub func([]byte) (*chaincode.InstalledChaincode, error) 76 installChaincodeMutex sync.RWMutex 77 installChaincodeArgsForCall []struct { 78 arg1 []byte 79 } 80 installChaincodeReturns struct { 81 result1 *chaincode.InstalledChaincode 82 result2 error 83 } 84 installChaincodeReturnsOnCall map[int]struct { 85 result1 *chaincode.InstalledChaincode 86 result2 error 87 } 88 QueryApprovedChaincodeDefinitionStub func(string, string, int64, lifecycle.ReadableState, lifecycle.ReadableState) (*lifecycle.ApprovedChaincodeDefinition, error) 89 queryApprovedChaincodeDefinitionMutex sync.RWMutex 90 queryApprovedChaincodeDefinitionArgsForCall []struct { 91 arg1 string 92 arg2 string 93 arg3 int64 94 arg4 lifecycle.ReadableState 95 arg5 lifecycle.ReadableState 96 } 97 queryApprovedChaincodeDefinitionReturns struct { 98 result1 *lifecycle.ApprovedChaincodeDefinition 99 result2 error 100 } 101 queryApprovedChaincodeDefinitionReturnsOnCall map[int]struct { 102 result1 *lifecycle.ApprovedChaincodeDefinition 103 result2 error 104 } 105 QueryChaincodeDefinitionStub func(string, lifecycle.ReadableState) (*lifecycle.ChaincodeDefinition, error) 106 queryChaincodeDefinitionMutex sync.RWMutex 107 queryChaincodeDefinitionArgsForCall []struct { 108 arg1 string 109 arg2 lifecycle.ReadableState 110 } 111 queryChaincodeDefinitionReturns struct { 112 result1 *lifecycle.ChaincodeDefinition 113 result2 error 114 } 115 queryChaincodeDefinitionReturnsOnCall map[int]struct { 116 result1 *lifecycle.ChaincodeDefinition 117 result2 error 118 } 119 QueryInstalledChaincodeStub func(string) (*chaincode.InstalledChaincode, error) 120 queryInstalledChaincodeMutex sync.RWMutex 121 queryInstalledChaincodeArgsForCall []struct { 122 arg1 string 123 } 124 queryInstalledChaincodeReturns struct { 125 result1 *chaincode.InstalledChaincode 126 result2 error 127 } 128 queryInstalledChaincodeReturnsOnCall map[int]struct { 129 result1 *chaincode.InstalledChaincode 130 result2 error 131 } 132 QueryInstalledChaincodesStub func() []*chaincode.InstalledChaincode 133 queryInstalledChaincodesMutex sync.RWMutex 134 queryInstalledChaincodesArgsForCall []struct { 135 } 136 queryInstalledChaincodesReturns struct { 137 result1 []*chaincode.InstalledChaincode 138 } 139 queryInstalledChaincodesReturnsOnCall map[int]struct { 140 result1 []*chaincode.InstalledChaincode 141 } 142 QueryNamespaceDefinitionsStub func(lifecycle.RangeableState) (map[string]string, error) 143 queryNamespaceDefinitionsMutex sync.RWMutex 144 queryNamespaceDefinitionsArgsForCall []struct { 145 arg1 lifecycle.RangeableState 146 } 147 queryNamespaceDefinitionsReturns struct { 148 result1 map[string]string 149 result2 error 150 } 151 queryNamespaceDefinitionsReturnsOnCall map[int]struct { 152 result1 map[string]string 153 result2 error 154 } 155 QueryOrgApprovalsStub func(string, *lifecycle.ChaincodeDefinition, []lifecycle.OpaqueState) (map[string]bool, error) 156 queryOrgApprovalsMutex sync.RWMutex 157 queryOrgApprovalsArgsForCall []struct { 158 arg1 string 159 arg2 *lifecycle.ChaincodeDefinition 160 arg3 []lifecycle.OpaqueState 161 } 162 queryOrgApprovalsReturns struct { 163 result1 map[string]bool 164 result2 error 165 } 166 queryOrgApprovalsReturnsOnCall map[int]struct { 167 result1 map[string]bool 168 result2 error 169 } 170 invocations map[string][][]interface{} 171 invocationsMutex sync.RWMutex 172 } 173 174 func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrg(arg1 string, arg2 string, arg3 *lifecycle.ChaincodeDefinition, arg4 string, arg5 lifecycle.ReadableState, arg6 lifecycle.ReadWritableState) error { 175 fake.approveChaincodeDefinitionForOrgMutex.Lock() 176 ret, specificReturn := fake.approveChaincodeDefinitionForOrgReturnsOnCall[len(fake.approveChaincodeDefinitionForOrgArgsForCall)] 177 fake.approveChaincodeDefinitionForOrgArgsForCall = append(fake.approveChaincodeDefinitionForOrgArgsForCall, struct { 178 arg1 string 179 arg2 string 180 arg3 *lifecycle.ChaincodeDefinition 181 arg4 string 182 arg5 lifecycle.ReadableState 183 arg6 lifecycle.ReadWritableState 184 }{arg1, arg2, arg3, arg4, arg5, arg6}) 185 fake.recordInvocation("ApproveChaincodeDefinitionForOrg", []interface{}{arg1, arg2, arg3, arg4, arg5, arg6}) 186 fake.approveChaincodeDefinitionForOrgMutex.Unlock() 187 if fake.ApproveChaincodeDefinitionForOrgStub != nil { 188 return fake.ApproveChaincodeDefinitionForOrgStub(arg1, arg2, arg3, arg4, arg5, arg6) 189 } 190 if specificReturn { 191 return ret.result1 192 } 193 fakeReturns := fake.approveChaincodeDefinitionForOrgReturns 194 return fakeReturns.result1 195 } 196 197 func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrgCallCount() int { 198 fake.approveChaincodeDefinitionForOrgMutex.RLock() 199 defer fake.approveChaincodeDefinitionForOrgMutex.RUnlock() 200 return len(fake.approveChaincodeDefinitionForOrgArgsForCall) 201 } 202 203 func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrgCalls(stub func(string, string, *lifecycle.ChaincodeDefinition, string, lifecycle.ReadableState, lifecycle.ReadWritableState) error) { 204 fake.approveChaincodeDefinitionForOrgMutex.Lock() 205 defer fake.approveChaincodeDefinitionForOrgMutex.Unlock() 206 fake.ApproveChaincodeDefinitionForOrgStub = stub 207 } 208 209 func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrgArgsForCall(i int) (string, string, *lifecycle.ChaincodeDefinition, string, lifecycle.ReadableState, lifecycle.ReadWritableState) { 210 fake.approveChaincodeDefinitionForOrgMutex.RLock() 211 defer fake.approveChaincodeDefinitionForOrgMutex.RUnlock() 212 argsForCall := fake.approveChaincodeDefinitionForOrgArgsForCall[i] 213 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5, argsForCall.arg6 214 } 215 216 func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrgReturns(result1 error) { 217 fake.approveChaincodeDefinitionForOrgMutex.Lock() 218 defer fake.approveChaincodeDefinitionForOrgMutex.Unlock() 219 fake.ApproveChaincodeDefinitionForOrgStub = nil 220 fake.approveChaincodeDefinitionForOrgReturns = struct { 221 result1 error 222 }{result1} 223 } 224 225 func (fake *SCCFunctions) ApproveChaincodeDefinitionForOrgReturnsOnCall(i int, result1 error) { 226 fake.approveChaincodeDefinitionForOrgMutex.Lock() 227 defer fake.approveChaincodeDefinitionForOrgMutex.Unlock() 228 fake.ApproveChaincodeDefinitionForOrgStub = nil 229 if fake.approveChaincodeDefinitionForOrgReturnsOnCall == nil { 230 fake.approveChaincodeDefinitionForOrgReturnsOnCall = make(map[int]struct { 231 result1 error 232 }) 233 } 234 fake.approveChaincodeDefinitionForOrgReturnsOnCall[i] = struct { 235 result1 error 236 }{result1} 237 } 238 239 func (fake *SCCFunctions) CheckCommitReadiness(arg1 string, arg2 string, arg3 *lifecycle.ChaincodeDefinition, arg4 lifecycle.ReadWritableState, arg5 []lifecycle.OpaqueState) (map[string]bool, error) { 240 var arg5Copy []lifecycle.OpaqueState 241 if arg5 != nil { 242 arg5Copy = make([]lifecycle.OpaqueState, len(arg5)) 243 copy(arg5Copy, arg5) 244 } 245 fake.checkCommitReadinessMutex.Lock() 246 ret, specificReturn := fake.checkCommitReadinessReturnsOnCall[len(fake.checkCommitReadinessArgsForCall)] 247 fake.checkCommitReadinessArgsForCall = append(fake.checkCommitReadinessArgsForCall, struct { 248 arg1 string 249 arg2 string 250 arg3 *lifecycle.ChaincodeDefinition 251 arg4 lifecycle.ReadWritableState 252 arg5 []lifecycle.OpaqueState 253 }{arg1, arg2, arg3, arg4, arg5Copy}) 254 fake.recordInvocation("CheckCommitReadiness", []interface{}{arg1, arg2, arg3, arg4, arg5Copy}) 255 fake.checkCommitReadinessMutex.Unlock() 256 if fake.CheckCommitReadinessStub != nil { 257 return fake.CheckCommitReadinessStub(arg1, arg2, arg3, arg4, arg5) 258 } 259 if specificReturn { 260 return ret.result1, ret.result2 261 } 262 fakeReturns := fake.checkCommitReadinessReturns 263 return fakeReturns.result1, fakeReturns.result2 264 } 265 266 func (fake *SCCFunctions) CheckCommitReadinessCallCount() int { 267 fake.checkCommitReadinessMutex.RLock() 268 defer fake.checkCommitReadinessMutex.RUnlock() 269 return len(fake.checkCommitReadinessArgsForCall) 270 } 271 272 func (fake *SCCFunctions) CheckCommitReadinessCalls(stub func(string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) (map[string]bool, error)) { 273 fake.checkCommitReadinessMutex.Lock() 274 defer fake.checkCommitReadinessMutex.Unlock() 275 fake.CheckCommitReadinessStub = stub 276 } 277 278 func (fake *SCCFunctions) CheckCommitReadinessArgsForCall(i int) (string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) { 279 fake.checkCommitReadinessMutex.RLock() 280 defer fake.checkCommitReadinessMutex.RUnlock() 281 argsForCall := fake.checkCommitReadinessArgsForCall[i] 282 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5 283 } 284 285 func (fake *SCCFunctions) CheckCommitReadinessReturns(result1 map[string]bool, result2 error) { 286 fake.checkCommitReadinessMutex.Lock() 287 defer fake.checkCommitReadinessMutex.Unlock() 288 fake.CheckCommitReadinessStub = nil 289 fake.checkCommitReadinessReturns = struct { 290 result1 map[string]bool 291 result2 error 292 }{result1, result2} 293 } 294 295 func (fake *SCCFunctions) CheckCommitReadinessReturnsOnCall(i int, result1 map[string]bool, result2 error) { 296 fake.checkCommitReadinessMutex.Lock() 297 defer fake.checkCommitReadinessMutex.Unlock() 298 fake.CheckCommitReadinessStub = nil 299 if fake.checkCommitReadinessReturnsOnCall == nil { 300 fake.checkCommitReadinessReturnsOnCall = make(map[int]struct { 301 result1 map[string]bool 302 result2 error 303 }) 304 } 305 fake.checkCommitReadinessReturnsOnCall[i] = struct { 306 result1 map[string]bool 307 result2 error 308 }{result1, result2} 309 } 310 311 func (fake *SCCFunctions) CommitChaincodeDefinition(arg1 string, arg2 string, arg3 *lifecycle.ChaincodeDefinition, arg4 lifecycle.ReadWritableState, arg5 []lifecycle.OpaqueState) (map[string]bool, error) { 312 var arg5Copy []lifecycle.OpaqueState 313 if arg5 != nil { 314 arg5Copy = make([]lifecycle.OpaqueState, len(arg5)) 315 copy(arg5Copy, arg5) 316 } 317 fake.commitChaincodeDefinitionMutex.Lock() 318 ret, specificReturn := fake.commitChaincodeDefinitionReturnsOnCall[len(fake.commitChaincodeDefinitionArgsForCall)] 319 fake.commitChaincodeDefinitionArgsForCall = append(fake.commitChaincodeDefinitionArgsForCall, struct { 320 arg1 string 321 arg2 string 322 arg3 *lifecycle.ChaincodeDefinition 323 arg4 lifecycle.ReadWritableState 324 arg5 []lifecycle.OpaqueState 325 }{arg1, arg2, arg3, arg4, arg5Copy}) 326 fake.recordInvocation("CommitChaincodeDefinition", []interface{}{arg1, arg2, arg3, arg4, arg5Copy}) 327 fake.commitChaincodeDefinitionMutex.Unlock() 328 if fake.CommitChaincodeDefinitionStub != nil { 329 return fake.CommitChaincodeDefinitionStub(arg1, arg2, arg3, arg4, arg5) 330 } 331 if specificReturn { 332 return ret.result1, ret.result2 333 } 334 fakeReturns := fake.commitChaincodeDefinitionReturns 335 return fakeReturns.result1, fakeReturns.result2 336 } 337 338 func (fake *SCCFunctions) CommitChaincodeDefinitionCallCount() int { 339 fake.commitChaincodeDefinitionMutex.RLock() 340 defer fake.commitChaincodeDefinitionMutex.RUnlock() 341 return len(fake.commitChaincodeDefinitionArgsForCall) 342 } 343 344 func (fake *SCCFunctions) CommitChaincodeDefinitionCalls(stub func(string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) (map[string]bool, error)) { 345 fake.commitChaincodeDefinitionMutex.Lock() 346 defer fake.commitChaincodeDefinitionMutex.Unlock() 347 fake.CommitChaincodeDefinitionStub = stub 348 } 349 350 func (fake *SCCFunctions) CommitChaincodeDefinitionArgsForCall(i int) (string, string, *lifecycle.ChaincodeDefinition, lifecycle.ReadWritableState, []lifecycle.OpaqueState) { 351 fake.commitChaincodeDefinitionMutex.RLock() 352 defer fake.commitChaincodeDefinitionMutex.RUnlock() 353 argsForCall := fake.commitChaincodeDefinitionArgsForCall[i] 354 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5 355 } 356 357 func (fake *SCCFunctions) CommitChaincodeDefinitionReturns(result1 map[string]bool, result2 error) { 358 fake.commitChaincodeDefinitionMutex.Lock() 359 defer fake.commitChaincodeDefinitionMutex.Unlock() 360 fake.CommitChaincodeDefinitionStub = nil 361 fake.commitChaincodeDefinitionReturns = struct { 362 result1 map[string]bool 363 result2 error 364 }{result1, result2} 365 } 366 367 func (fake *SCCFunctions) CommitChaincodeDefinitionReturnsOnCall(i int, result1 map[string]bool, result2 error) { 368 fake.commitChaincodeDefinitionMutex.Lock() 369 defer fake.commitChaincodeDefinitionMutex.Unlock() 370 fake.CommitChaincodeDefinitionStub = nil 371 if fake.commitChaincodeDefinitionReturnsOnCall == nil { 372 fake.commitChaincodeDefinitionReturnsOnCall = make(map[int]struct { 373 result1 map[string]bool 374 result2 error 375 }) 376 } 377 fake.commitChaincodeDefinitionReturnsOnCall[i] = struct { 378 result1 map[string]bool 379 result2 error 380 }{result1, result2} 381 } 382 383 func (fake *SCCFunctions) GetInstalledChaincodePackage(arg1 string) ([]byte, error) { 384 fake.getInstalledChaincodePackageMutex.Lock() 385 ret, specificReturn := fake.getInstalledChaincodePackageReturnsOnCall[len(fake.getInstalledChaincodePackageArgsForCall)] 386 fake.getInstalledChaincodePackageArgsForCall = append(fake.getInstalledChaincodePackageArgsForCall, struct { 387 arg1 string 388 }{arg1}) 389 fake.recordInvocation("GetInstalledChaincodePackage", []interface{}{arg1}) 390 fake.getInstalledChaincodePackageMutex.Unlock() 391 if fake.GetInstalledChaincodePackageStub != nil { 392 return fake.GetInstalledChaincodePackageStub(arg1) 393 } 394 if specificReturn { 395 return ret.result1, ret.result2 396 } 397 fakeReturns := fake.getInstalledChaincodePackageReturns 398 return fakeReturns.result1, fakeReturns.result2 399 } 400 401 func (fake *SCCFunctions) GetInstalledChaincodePackageCallCount() int { 402 fake.getInstalledChaincodePackageMutex.RLock() 403 defer fake.getInstalledChaincodePackageMutex.RUnlock() 404 return len(fake.getInstalledChaincodePackageArgsForCall) 405 } 406 407 func (fake *SCCFunctions) GetInstalledChaincodePackageCalls(stub func(string) ([]byte, error)) { 408 fake.getInstalledChaincodePackageMutex.Lock() 409 defer fake.getInstalledChaincodePackageMutex.Unlock() 410 fake.GetInstalledChaincodePackageStub = stub 411 } 412 413 func (fake *SCCFunctions) GetInstalledChaincodePackageArgsForCall(i int) string { 414 fake.getInstalledChaincodePackageMutex.RLock() 415 defer fake.getInstalledChaincodePackageMutex.RUnlock() 416 argsForCall := fake.getInstalledChaincodePackageArgsForCall[i] 417 return argsForCall.arg1 418 } 419 420 func (fake *SCCFunctions) GetInstalledChaincodePackageReturns(result1 []byte, result2 error) { 421 fake.getInstalledChaincodePackageMutex.Lock() 422 defer fake.getInstalledChaincodePackageMutex.Unlock() 423 fake.GetInstalledChaincodePackageStub = nil 424 fake.getInstalledChaincodePackageReturns = struct { 425 result1 []byte 426 result2 error 427 }{result1, result2} 428 } 429 430 func (fake *SCCFunctions) GetInstalledChaincodePackageReturnsOnCall(i int, result1 []byte, result2 error) { 431 fake.getInstalledChaincodePackageMutex.Lock() 432 defer fake.getInstalledChaincodePackageMutex.Unlock() 433 fake.GetInstalledChaincodePackageStub = nil 434 if fake.getInstalledChaincodePackageReturnsOnCall == nil { 435 fake.getInstalledChaincodePackageReturnsOnCall = make(map[int]struct { 436 result1 []byte 437 result2 error 438 }) 439 } 440 fake.getInstalledChaincodePackageReturnsOnCall[i] = struct { 441 result1 []byte 442 result2 error 443 }{result1, result2} 444 } 445 446 func (fake *SCCFunctions) InstallChaincode(arg1 []byte) (*chaincode.InstalledChaincode, error) { 447 var arg1Copy []byte 448 if arg1 != nil { 449 arg1Copy = make([]byte, len(arg1)) 450 copy(arg1Copy, arg1) 451 } 452 fake.installChaincodeMutex.Lock() 453 ret, specificReturn := fake.installChaincodeReturnsOnCall[len(fake.installChaincodeArgsForCall)] 454 fake.installChaincodeArgsForCall = append(fake.installChaincodeArgsForCall, struct { 455 arg1 []byte 456 }{arg1Copy}) 457 fake.recordInvocation("InstallChaincode", []interface{}{arg1Copy}) 458 fake.installChaincodeMutex.Unlock() 459 if fake.InstallChaincodeStub != nil { 460 return fake.InstallChaincodeStub(arg1) 461 } 462 if specificReturn { 463 return ret.result1, ret.result2 464 } 465 fakeReturns := fake.installChaincodeReturns 466 return fakeReturns.result1, fakeReturns.result2 467 } 468 469 func (fake *SCCFunctions) InstallChaincodeCallCount() int { 470 fake.installChaincodeMutex.RLock() 471 defer fake.installChaincodeMutex.RUnlock() 472 return len(fake.installChaincodeArgsForCall) 473 } 474 475 func (fake *SCCFunctions) InstallChaincodeCalls(stub func([]byte) (*chaincode.InstalledChaincode, error)) { 476 fake.installChaincodeMutex.Lock() 477 defer fake.installChaincodeMutex.Unlock() 478 fake.InstallChaincodeStub = stub 479 } 480 481 func (fake *SCCFunctions) InstallChaincodeArgsForCall(i int) []byte { 482 fake.installChaincodeMutex.RLock() 483 defer fake.installChaincodeMutex.RUnlock() 484 argsForCall := fake.installChaincodeArgsForCall[i] 485 return argsForCall.arg1 486 } 487 488 func (fake *SCCFunctions) InstallChaincodeReturns(result1 *chaincode.InstalledChaincode, result2 error) { 489 fake.installChaincodeMutex.Lock() 490 defer fake.installChaincodeMutex.Unlock() 491 fake.InstallChaincodeStub = nil 492 fake.installChaincodeReturns = struct { 493 result1 *chaincode.InstalledChaincode 494 result2 error 495 }{result1, result2} 496 } 497 498 func (fake *SCCFunctions) InstallChaincodeReturnsOnCall(i int, result1 *chaincode.InstalledChaincode, result2 error) { 499 fake.installChaincodeMutex.Lock() 500 defer fake.installChaincodeMutex.Unlock() 501 fake.InstallChaincodeStub = nil 502 if fake.installChaincodeReturnsOnCall == nil { 503 fake.installChaincodeReturnsOnCall = make(map[int]struct { 504 result1 *chaincode.InstalledChaincode 505 result2 error 506 }) 507 } 508 fake.installChaincodeReturnsOnCall[i] = struct { 509 result1 *chaincode.InstalledChaincode 510 result2 error 511 }{result1, result2} 512 } 513 514 func (fake *SCCFunctions) QueryApprovedChaincodeDefinition(arg1 string, arg2 string, arg3 int64, arg4 lifecycle.ReadableState, arg5 lifecycle.ReadableState) (*lifecycle.ApprovedChaincodeDefinition, error) { 515 fake.queryApprovedChaincodeDefinitionMutex.Lock() 516 ret, specificReturn := fake.queryApprovedChaincodeDefinitionReturnsOnCall[len(fake.queryApprovedChaincodeDefinitionArgsForCall)] 517 fake.queryApprovedChaincodeDefinitionArgsForCall = append(fake.queryApprovedChaincodeDefinitionArgsForCall, struct { 518 arg1 string 519 arg2 string 520 arg3 int64 521 arg4 lifecycle.ReadableState 522 arg5 lifecycle.ReadableState 523 }{arg1, arg2, arg3, arg4, arg5}) 524 fake.recordInvocation("QueryApprovedChaincodeDefinition", []interface{}{arg1, arg2, arg3, arg4, arg5}) 525 fake.queryApprovedChaincodeDefinitionMutex.Unlock() 526 if fake.QueryApprovedChaincodeDefinitionStub != nil { 527 return fake.QueryApprovedChaincodeDefinitionStub(arg1, arg2, arg3, arg4, arg5) 528 } 529 if specificReturn { 530 return ret.result1, ret.result2 531 } 532 fakeReturns := fake.queryApprovedChaincodeDefinitionReturns 533 return fakeReturns.result1, fakeReturns.result2 534 } 535 536 func (fake *SCCFunctions) QueryApprovedChaincodeDefinitionCallCount() int { 537 fake.queryApprovedChaincodeDefinitionMutex.RLock() 538 defer fake.queryApprovedChaincodeDefinitionMutex.RUnlock() 539 return len(fake.queryApprovedChaincodeDefinitionArgsForCall) 540 } 541 542 func (fake *SCCFunctions) QueryApprovedChaincodeDefinitionCalls(stub func(string, string, int64, lifecycle.ReadableState, lifecycle.ReadableState) (*lifecycle.ApprovedChaincodeDefinition, error)) { 543 fake.queryApprovedChaincodeDefinitionMutex.Lock() 544 defer fake.queryApprovedChaincodeDefinitionMutex.Unlock() 545 fake.QueryApprovedChaincodeDefinitionStub = stub 546 } 547 548 func (fake *SCCFunctions) QueryApprovedChaincodeDefinitionArgsForCall(i int) (string, string, int64, lifecycle.ReadableState, lifecycle.ReadableState) { 549 fake.queryApprovedChaincodeDefinitionMutex.RLock() 550 defer fake.queryApprovedChaincodeDefinitionMutex.RUnlock() 551 argsForCall := fake.queryApprovedChaincodeDefinitionArgsForCall[i] 552 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5 553 } 554 555 func (fake *SCCFunctions) QueryApprovedChaincodeDefinitionReturns(result1 *lifecycle.ApprovedChaincodeDefinition, result2 error) { 556 fake.queryApprovedChaincodeDefinitionMutex.Lock() 557 defer fake.queryApprovedChaincodeDefinitionMutex.Unlock() 558 fake.QueryApprovedChaincodeDefinitionStub = nil 559 fake.queryApprovedChaincodeDefinitionReturns = struct { 560 result1 *lifecycle.ApprovedChaincodeDefinition 561 result2 error 562 }{result1, result2} 563 } 564 565 func (fake *SCCFunctions) QueryApprovedChaincodeDefinitionReturnsOnCall(i int, result1 *lifecycle.ApprovedChaincodeDefinition, result2 error) { 566 fake.queryApprovedChaincodeDefinitionMutex.Lock() 567 defer fake.queryApprovedChaincodeDefinitionMutex.Unlock() 568 fake.QueryApprovedChaincodeDefinitionStub = nil 569 if fake.queryApprovedChaincodeDefinitionReturnsOnCall == nil { 570 fake.queryApprovedChaincodeDefinitionReturnsOnCall = make(map[int]struct { 571 result1 *lifecycle.ApprovedChaincodeDefinition 572 result2 error 573 }) 574 } 575 fake.queryApprovedChaincodeDefinitionReturnsOnCall[i] = struct { 576 result1 *lifecycle.ApprovedChaincodeDefinition 577 result2 error 578 }{result1, result2} 579 } 580 581 func (fake *SCCFunctions) QueryChaincodeDefinition(arg1 string, arg2 lifecycle.ReadableState) (*lifecycle.ChaincodeDefinition, error) { 582 fake.queryChaincodeDefinitionMutex.Lock() 583 ret, specificReturn := fake.queryChaincodeDefinitionReturnsOnCall[len(fake.queryChaincodeDefinitionArgsForCall)] 584 fake.queryChaincodeDefinitionArgsForCall = append(fake.queryChaincodeDefinitionArgsForCall, struct { 585 arg1 string 586 arg2 lifecycle.ReadableState 587 }{arg1, arg2}) 588 fake.recordInvocation("QueryChaincodeDefinition", []interface{}{arg1, arg2}) 589 fake.queryChaincodeDefinitionMutex.Unlock() 590 if fake.QueryChaincodeDefinitionStub != nil { 591 return fake.QueryChaincodeDefinitionStub(arg1, arg2) 592 } 593 if specificReturn { 594 return ret.result1, ret.result2 595 } 596 fakeReturns := fake.queryChaincodeDefinitionReturns 597 return fakeReturns.result1, fakeReturns.result2 598 } 599 600 func (fake *SCCFunctions) QueryChaincodeDefinitionCallCount() int { 601 fake.queryChaincodeDefinitionMutex.RLock() 602 defer fake.queryChaincodeDefinitionMutex.RUnlock() 603 return len(fake.queryChaincodeDefinitionArgsForCall) 604 } 605 606 func (fake *SCCFunctions) QueryChaincodeDefinitionCalls(stub func(string, lifecycle.ReadableState) (*lifecycle.ChaincodeDefinition, error)) { 607 fake.queryChaincodeDefinitionMutex.Lock() 608 defer fake.queryChaincodeDefinitionMutex.Unlock() 609 fake.QueryChaincodeDefinitionStub = stub 610 } 611 612 func (fake *SCCFunctions) QueryChaincodeDefinitionArgsForCall(i int) (string, lifecycle.ReadableState) { 613 fake.queryChaincodeDefinitionMutex.RLock() 614 defer fake.queryChaincodeDefinitionMutex.RUnlock() 615 argsForCall := fake.queryChaincodeDefinitionArgsForCall[i] 616 return argsForCall.arg1, argsForCall.arg2 617 } 618 619 func (fake *SCCFunctions) QueryChaincodeDefinitionReturns(result1 *lifecycle.ChaincodeDefinition, result2 error) { 620 fake.queryChaincodeDefinitionMutex.Lock() 621 defer fake.queryChaincodeDefinitionMutex.Unlock() 622 fake.QueryChaincodeDefinitionStub = nil 623 fake.queryChaincodeDefinitionReturns = struct { 624 result1 *lifecycle.ChaincodeDefinition 625 result2 error 626 }{result1, result2} 627 } 628 629 func (fake *SCCFunctions) QueryChaincodeDefinitionReturnsOnCall(i int, result1 *lifecycle.ChaincodeDefinition, result2 error) { 630 fake.queryChaincodeDefinitionMutex.Lock() 631 defer fake.queryChaincodeDefinitionMutex.Unlock() 632 fake.QueryChaincodeDefinitionStub = nil 633 if fake.queryChaincodeDefinitionReturnsOnCall == nil { 634 fake.queryChaincodeDefinitionReturnsOnCall = make(map[int]struct { 635 result1 *lifecycle.ChaincodeDefinition 636 result2 error 637 }) 638 } 639 fake.queryChaincodeDefinitionReturnsOnCall[i] = struct { 640 result1 *lifecycle.ChaincodeDefinition 641 result2 error 642 }{result1, result2} 643 } 644 645 func (fake *SCCFunctions) QueryInstalledChaincode(arg1 string) (*chaincode.InstalledChaincode, error) { 646 fake.queryInstalledChaincodeMutex.Lock() 647 ret, specificReturn := fake.queryInstalledChaincodeReturnsOnCall[len(fake.queryInstalledChaincodeArgsForCall)] 648 fake.queryInstalledChaincodeArgsForCall = append(fake.queryInstalledChaincodeArgsForCall, struct { 649 arg1 string 650 }{arg1}) 651 fake.recordInvocation("QueryInstalledChaincode", []interface{}{arg1}) 652 fake.queryInstalledChaincodeMutex.Unlock() 653 if fake.QueryInstalledChaincodeStub != nil { 654 return fake.QueryInstalledChaincodeStub(arg1) 655 } 656 if specificReturn { 657 return ret.result1, ret.result2 658 } 659 fakeReturns := fake.queryInstalledChaincodeReturns 660 return fakeReturns.result1, fakeReturns.result2 661 } 662 663 func (fake *SCCFunctions) QueryInstalledChaincodeCallCount() int { 664 fake.queryInstalledChaincodeMutex.RLock() 665 defer fake.queryInstalledChaincodeMutex.RUnlock() 666 return len(fake.queryInstalledChaincodeArgsForCall) 667 } 668 669 func (fake *SCCFunctions) QueryInstalledChaincodeCalls(stub func(string) (*chaincode.InstalledChaincode, error)) { 670 fake.queryInstalledChaincodeMutex.Lock() 671 defer fake.queryInstalledChaincodeMutex.Unlock() 672 fake.QueryInstalledChaincodeStub = stub 673 } 674 675 func (fake *SCCFunctions) QueryInstalledChaincodeArgsForCall(i int) string { 676 fake.queryInstalledChaincodeMutex.RLock() 677 defer fake.queryInstalledChaincodeMutex.RUnlock() 678 argsForCall := fake.queryInstalledChaincodeArgsForCall[i] 679 return argsForCall.arg1 680 } 681 682 func (fake *SCCFunctions) QueryInstalledChaincodeReturns(result1 *chaincode.InstalledChaincode, result2 error) { 683 fake.queryInstalledChaincodeMutex.Lock() 684 defer fake.queryInstalledChaincodeMutex.Unlock() 685 fake.QueryInstalledChaincodeStub = nil 686 fake.queryInstalledChaincodeReturns = struct { 687 result1 *chaincode.InstalledChaincode 688 result2 error 689 }{result1, result2} 690 } 691 692 func (fake *SCCFunctions) QueryInstalledChaincodeReturnsOnCall(i int, result1 *chaincode.InstalledChaincode, result2 error) { 693 fake.queryInstalledChaincodeMutex.Lock() 694 defer fake.queryInstalledChaincodeMutex.Unlock() 695 fake.QueryInstalledChaincodeStub = nil 696 if fake.queryInstalledChaincodeReturnsOnCall == nil { 697 fake.queryInstalledChaincodeReturnsOnCall = make(map[int]struct { 698 result1 *chaincode.InstalledChaincode 699 result2 error 700 }) 701 } 702 fake.queryInstalledChaincodeReturnsOnCall[i] = struct { 703 result1 *chaincode.InstalledChaincode 704 result2 error 705 }{result1, result2} 706 } 707 708 func (fake *SCCFunctions) QueryInstalledChaincodes() []*chaincode.InstalledChaincode { 709 fake.queryInstalledChaincodesMutex.Lock() 710 ret, specificReturn := fake.queryInstalledChaincodesReturnsOnCall[len(fake.queryInstalledChaincodesArgsForCall)] 711 fake.queryInstalledChaincodesArgsForCall = append(fake.queryInstalledChaincodesArgsForCall, struct { 712 }{}) 713 fake.recordInvocation("QueryInstalledChaincodes", []interface{}{}) 714 fake.queryInstalledChaincodesMutex.Unlock() 715 if fake.QueryInstalledChaincodesStub != nil { 716 return fake.QueryInstalledChaincodesStub() 717 } 718 if specificReturn { 719 return ret.result1 720 } 721 fakeReturns := fake.queryInstalledChaincodesReturns 722 return fakeReturns.result1 723 } 724 725 func (fake *SCCFunctions) QueryInstalledChaincodesCallCount() int { 726 fake.queryInstalledChaincodesMutex.RLock() 727 defer fake.queryInstalledChaincodesMutex.RUnlock() 728 return len(fake.queryInstalledChaincodesArgsForCall) 729 } 730 731 func (fake *SCCFunctions) QueryInstalledChaincodesCalls(stub func() []*chaincode.InstalledChaincode) { 732 fake.queryInstalledChaincodesMutex.Lock() 733 defer fake.queryInstalledChaincodesMutex.Unlock() 734 fake.QueryInstalledChaincodesStub = stub 735 } 736 737 func (fake *SCCFunctions) QueryInstalledChaincodesReturns(result1 []*chaincode.InstalledChaincode) { 738 fake.queryInstalledChaincodesMutex.Lock() 739 defer fake.queryInstalledChaincodesMutex.Unlock() 740 fake.QueryInstalledChaincodesStub = nil 741 fake.queryInstalledChaincodesReturns = struct { 742 result1 []*chaincode.InstalledChaincode 743 }{result1} 744 } 745 746 func (fake *SCCFunctions) QueryInstalledChaincodesReturnsOnCall(i int, result1 []*chaincode.InstalledChaincode) { 747 fake.queryInstalledChaincodesMutex.Lock() 748 defer fake.queryInstalledChaincodesMutex.Unlock() 749 fake.QueryInstalledChaincodesStub = nil 750 if fake.queryInstalledChaincodesReturnsOnCall == nil { 751 fake.queryInstalledChaincodesReturnsOnCall = make(map[int]struct { 752 result1 []*chaincode.InstalledChaincode 753 }) 754 } 755 fake.queryInstalledChaincodesReturnsOnCall[i] = struct { 756 result1 []*chaincode.InstalledChaincode 757 }{result1} 758 } 759 760 func (fake *SCCFunctions) QueryNamespaceDefinitions(arg1 lifecycle.RangeableState) (map[string]string, error) { 761 fake.queryNamespaceDefinitionsMutex.Lock() 762 ret, specificReturn := fake.queryNamespaceDefinitionsReturnsOnCall[len(fake.queryNamespaceDefinitionsArgsForCall)] 763 fake.queryNamespaceDefinitionsArgsForCall = append(fake.queryNamespaceDefinitionsArgsForCall, struct { 764 arg1 lifecycle.RangeableState 765 }{arg1}) 766 fake.recordInvocation("QueryNamespaceDefinitions", []interface{}{arg1}) 767 fake.queryNamespaceDefinitionsMutex.Unlock() 768 if fake.QueryNamespaceDefinitionsStub != nil { 769 return fake.QueryNamespaceDefinitionsStub(arg1) 770 } 771 if specificReturn { 772 return ret.result1, ret.result2 773 } 774 fakeReturns := fake.queryNamespaceDefinitionsReturns 775 return fakeReturns.result1, fakeReturns.result2 776 } 777 778 func (fake *SCCFunctions) QueryNamespaceDefinitionsCallCount() int { 779 fake.queryNamespaceDefinitionsMutex.RLock() 780 defer fake.queryNamespaceDefinitionsMutex.RUnlock() 781 return len(fake.queryNamespaceDefinitionsArgsForCall) 782 } 783 784 func (fake *SCCFunctions) QueryNamespaceDefinitionsCalls(stub func(lifecycle.RangeableState) (map[string]string, error)) { 785 fake.queryNamespaceDefinitionsMutex.Lock() 786 defer fake.queryNamespaceDefinitionsMutex.Unlock() 787 fake.QueryNamespaceDefinitionsStub = stub 788 } 789 790 func (fake *SCCFunctions) QueryNamespaceDefinitionsArgsForCall(i int) lifecycle.RangeableState { 791 fake.queryNamespaceDefinitionsMutex.RLock() 792 defer fake.queryNamespaceDefinitionsMutex.RUnlock() 793 argsForCall := fake.queryNamespaceDefinitionsArgsForCall[i] 794 return argsForCall.arg1 795 } 796 797 func (fake *SCCFunctions) QueryNamespaceDefinitionsReturns(result1 map[string]string, result2 error) { 798 fake.queryNamespaceDefinitionsMutex.Lock() 799 defer fake.queryNamespaceDefinitionsMutex.Unlock() 800 fake.QueryNamespaceDefinitionsStub = nil 801 fake.queryNamespaceDefinitionsReturns = struct { 802 result1 map[string]string 803 result2 error 804 }{result1, result2} 805 } 806 807 func (fake *SCCFunctions) QueryNamespaceDefinitionsReturnsOnCall(i int, result1 map[string]string, result2 error) { 808 fake.queryNamespaceDefinitionsMutex.Lock() 809 defer fake.queryNamespaceDefinitionsMutex.Unlock() 810 fake.QueryNamespaceDefinitionsStub = nil 811 if fake.queryNamespaceDefinitionsReturnsOnCall == nil { 812 fake.queryNamespaceDefinitionsReturnsOnCall = make(map[int]struct { 813 result1 map[string]string 814 result2 error 815 }) 816 } 817 fake.queryNamespaceDefinitionsReturnsOnCall[i] = struct { 818 result1 map[string]string 819 result2 error 820 }{result1, result2} 821 } 822 823 func (fake *SCCFunctions) QueryOrgApprovals(arg1 string, arg2 *lifecycle.ChaincodeDefinition, arg3 []lifecycle.OpaqueState) (map[string]bool, error) { 824 var arg3Copy []lifecycle.OpaqueState 825 if arg3 != nil { 826 arg3Copy = make([]lifecycle.OpaqueState, len(arg3)) 827 copy(arg3Copy, arg3) 828 } 829 fake.queryOrgApprovalsMutex.Lock() 830 ret, specificReturn := fake.queryOrgApprovalsReturnsOnCall[len(fake.queryOrgApprovalsArgsForCall)] 831 fake.queryOrgApprovalsArgsForCall = append(fake.queryOrgApprovalsArgsForCall, struct { 832 arg1 string 833 arg2 *lifecycle.ChaincodeDefinition 834 arg3 []lifecycle.OpaqueState 835 }{arg1, arg2, arg3Copy}) 836 fake.recordInvocation("QueryOrgApprovals", []interface{}{arg1, arg2, arg3Copy}) 837 fake.queryOrgApprovalsMutex.Unlock() 838 if fake.QueryOrgApprovalsStub != nil { 839 return fake.QueryOrgApprovalsStub(arg1, arg2, arg3) 840 } 841 if specificReturn { 842 return ret.result1, ret.result2 843 } 844 fakeReturns := fake.queryOrgApprovalsReturns 845 return fakeReturns.result1, fakeReturns.result2 846 } 847 848 func (fake *SCCFunctions) QueryOrgApprovalsCallCount() int { 849 fake.queryOrgApprovalsMutex.RLock() 850 defer fake.queryOrgApprovalsMutex.RUnlock() 851 return len(fake.queryOrgApprovalsArgsForCall) 852 } 853 854 func (fake *SCCFunctions) QueryOrgApprovalsCalls(stub func(string, *lifecycle.ChaincodeDefinition, []lifecycle.OpaqueState) (map[string]bool, error)) { 855 fake.queryOrgApprovalsMutex.Lock() 856 defer fake.queryOrgApprovalsMutex.Unlock() 857 fake.QueryOrgApprovalsStub = stub 858 } 859 860 func (fake *SCCFunctions) QueryOrgApprovalsArgsForCall(i int) (string, *lifecycle.ChaincodeDefinition, []lifecycle.OpaqueState) { 861 fake.queryOrgApprovalsMutex.RLock() 862 defer fake.queryOrgApprovalsMutex.RUnlock() 863 argsForCall := fake.queryOrgApprovalsArgsForCall[i] 864 return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 865 } 866 867 func (fake *SCCFunctions) QueryOrgApprovalsReturns(result1 map[string]bool, result2 error) { 868 fake.queryOrgApprovalsMutex.Lock() 869 defer fake.queryOrgApprovalsMutex.Unlock() 870 fake.QueryOrgApprovalsStub = nil 871 fake.queryOrgApprovalsReturns = struct { 872 result1 map[string]bool 873 result2 error 874 }{result1, result2} 875 } 876 877 func (fake *SCCFunctions) QueryOrgApprovalsReturnsOnCall(i int, result1 map[string]bool, result2 error) { 878 fake.queryOrgApprovalsMutex.Lock() 879 defer fake.queryOrgApprovalsMutex.Unlock() 880 fake.QueryOrgApprovalsStub = nil 881 if fake.queryOrgApprovalsReturnsOnCall == nil { 882 fake.queryOrgApprovalsReturnsOnCall = make(map[int]struct { 883 result1 map[string]bool 884 result2 error 885 }) 886 } 887 fake.queryOrgApprovalsReturnsOnCall[i] = struct { 888 result1 map[string]bool 889 result2 error 890 }{result1, result2} 891 } 892 893 func (fake *SCCFunctions) Invocations() map[string][][]interface{} { 894 fake.invocationsMutex.RLock() 895 defer fake.invocationsMutex.RUnlock() 896 fake.approveChaincodeDefinitionForOrgMutex.RLock() 897 defer fake.approveChaincodeDefinitionForOrgMutex.RUnlock() 898 fake.checkCommitReadinessMutex.RLock() 899 defer fake.checkCommitReadinessMutex.RUnlock() 900 fake.commitChaincodeDefinitionMutex.RLock() 901 defer fake.commitChaincodeDefinitionMutex.RUnlock() 902 fake.getInstalledChaincodePackageMutex.RLock() 903 defer fake.getInstalledChaincodePackageMutex.RUnlock() 904 fake.installChaincodeMutex.RLock() 905 defer fake.installChaincodeMutex.RUnlock() 906 fake.queryApprovedChaincodeDefinitionMutex.RLock() 907 defer fake.queryApprovedChaincodeDefinitionMutex.RUnlock() 908 fake.queryChaincodeDefinitionMutex.RLock() 909 defer fake.queryChaincodeDefinitionMutex.RUnlock() 910 fake.queryInstalledChaincodeMutex.RLock() 911 defer fake.queryInstalledChaincodeMutex.RUnlock() 912 fake.queryInstalledChaincodesMutex.RLock() 913 defer fake.queryInstalledChaincodesMutex.RUnlock() 914 fake.queryNamespaceDefinitionsMutex.RLock() 915 defer fake.queryNamespaceDefinitionsMutex.RUnlock() 916 fake.queryOrgApprovalsMutex.RLock() 917 defer fake.queryOrgApprovalsMutex.RUnlock() 918 copiedInvocations := map[string][][]interface{}{} 919 for key, value := range fake.invocations { 920 copiedInvocations[key] = value 921 } 922 return copiedInvocations 923 } 924 925 func (fake *SCCFunctions) recordInvocation(key string, args []interface{}) { 926 fake.invocationsMutex.Lock() 927 defer fake.invocationsMutex.Unlock() 928 if fake.invocations == nil { 929 fake.invocations = map[string][][]interface{}{} 930 } 931 if fake.invocations[key] == nil { 932 fake.invocations[key] = [][]interface{}{} 933 } 934 fake.invocations[key] = append(fake.invocations[key], args) 935 }