@@ -28,44 +28,39 @@ import (
28
28
//see systemchaincode_test.go for an example using "sample_syscc"
29
29
var systemChaincodes = []* SystemChaincode {
30
30
{
31
- ChainlessCC : true ,
32
- Enabled : true ,
33
- Name : "cscc" ,
34
- Path : "github.com/hyperledger/fabric/core/scc/cscc" ,
35
- InitArgs : [][]byte {[]byte ("" )},
36
- Chaincode : & cscc.PeerConfiger {},
31
+ Enabled : true ,
32
+ Name : "cscc" ,
33
+ Path : "github.com/hyperledger/fabric/core/scc/cscc" ,
34
+ InitArgs : [][]byte {[]byte ("" )},
35
+ Chaincode : & cscc.PeerConfiger {},
37
36
},
38
37
{
39
- ChainlessCC : false ,
40
- Enabled : true ,
41
- Name : "lccc" ,
42
- Path : "github.com/hyperledger/fabric/core/scc/lccc" ,
43
- InitArgs : [][]byte {[]byte ("" )},
44
- Chaincode : & lccc.LifeCycleSysCC {},
38
+ Enabled : true ,
39
+ Name : "lccc" ,
40
+ Path : "github.com/hyperledger/fabric/core/scc/lccc" ,
41
+ InitArgs : [][]byte {[]byte ("" )},
42
+ Chaincode : & lccc.LifeCycleSysCC {},
45
43
},
46
44
{
47
- ChainlessCC : false ,
48
- Enabled : true ,
49
- Name : "escc" ,
50
- Path : "github.com/hyperledger/fabric/core/scc/escc" ,
51
- InitArgs : [][]byte {[]byte ("" )},
52
- Chaincode : & escc.EndorserOneValidSignature {},
45
+ Enabled : true ,
46
+ Name : "escc" ,
47
+ Path : "github.com/hyperledger/fabric/core/scc/escc" ,
48
+ InitArgs : [][]byte {[]byte ("" )},
49
+ Chaincode : & escc.EndorserOneValidSignature {},
53
50
},
54
51
{
55
- ChainlessCC : false ,
56
- Enabled : true ,
57
- Name : "vscc" ,
58
- Path : "github.com/hyperledger/fabric/core/scc/vscc" ,
59
- InitArgs : [][]byte {[]byte ("" )},
60
- Chaincode : & vscc.ValidatorOneValidSignature {},
52
+ Enabled : true ,
53
+ Name : "vscc" ,
54
+ Path : "github.com/hyperledger/fabric/core/scc/vscc" ,
55
+ InitArgs : [][]byte {[]byte ("" )},
56
+ Chaincode : & vscc.ValidatorOneValidSignature {},
61
57
},
62
58
{
63
- ChainlessCC : true ,
64
- Enabled : true ,
65
- Name : "qscc" ,
66
- Path : "github.com/hyperledger/fabric/core/chaincode/qscc" ,
67
- InitArgs : [][]byte {[]byte ("" )},
68
- Chaincode : & qscc.LedgerQuerier {},
59
+ Enabled : true ,
60
+ Name : "qscc" ,
61
+ Path : "github.com/hyperledger/fabric/core/chaincode/qscc" ,
62
+ InitArgs : [][]byte {[]byte ("" )},
63
+ Chaincode : & qscc.LedgerQuerier {},
69
64
},
70
65
}
71
66
@@ -81,19 +76,7 @@ func RegisterSysCCs() {
81
76
//note the chaincode must still be deployed and launched like a user chaincode will be
82
77
func DeploySysCCs (chainID string ) {
83
78
for _ , sysCC := range systemChaincodes {
84
- if ! sysCC .ChainlessCC {
85
- deploySysCC (chainID , sysCC )
86
- }
87
- }
88
- }
89
-
90
- //DeployChainlessSysCCs is the hook for deploying chainless system chaincodes
91
- //these chaincodes cannot make any ledger calls
92
- func DeployChainlessSysCCs () {
93
- for _ , sysCC := range systemChaincodes {
94
- if sysCC .ChainlessCC {
95
- deploySysCC ("" , sysCC )
96
- }
79
+ deploySysCC (chainID , sysCC )
97
80
}
98
81
}
99
82
@@ -102,9 +85,7 @@ func DeployChainlessSysCCs() {
102
85
//in the same process
103
86
func DeDeploySysCCs (chainID string ) {
104
87
for _ , sysCC := range systemChaincodes {
105
- if ! sysCC .ChainlessCC {
106
- DeDeploySysCC (chainID , sysCC )
107
- }
88
+ DeDeploySysCC (chainID , sysCC )
108
89
}
109
90
}
110
91
@@ -119,17 +100,6 @@ func IsSysCC(name string) bool {
119
100
return false
120
101
}
121
102
122
- //IsChainlessSysCC returns true if the name matches a chainless system chaincode's
123
- //system chaincode names are system, chain wide
124
- func IsChainlessSysCC (name string ) bool {
125
- for _ , sysCC := range systemChaincodes {
126
- if sysCC .Name == name && sysCC .ChainlessCC {
127
- return true
128
- }
129
- }
130
- return false
131
- }
132
-
133
103
// MockRegisterSysCCs is used only for testing
134
104
// This is needed to break import cycle
135
105
func MockRegisterSysCCs (mockSysCCs []* SystemChaincode ) []* SystemChaincode {
0 commit comments