forked from hyperledger/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
importsysccs.go
28 lines (23 loc) · 864 Bytes
/
importsysccs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package scc
import (
"github.com/hyperledger/fabric/core/common/ccprovider"
)
//DeploySysCCs is the hook for system chaincodes where system chaincodes are registered with the fabric
//note the chaincode must still be deployed and launched like a user chaincode will be
func (p *Provider) DeploySysCCs(chainID string, ccp ccprovider.ChaincodeProvider) {
for _, sysCC := range p.SysCCs {
deploySysCC(chainID, ccp, sysCC)
}
}
//DeDeploySysCCs is used in unit tests to stop and remove the system chaincodes before
//restarting them in the same process. This allows clean start of the system
//in the same process
func (p *Provider) DeDeploySysCCs(chainID string, ccp ccprovider.ChaincodeProvider) {
for _, sysCC := range p.SysCCs {
deDeploySysCC(chainID, ccp, sysCC)
}
}