@@ -23,6 +23,7 @@ import (
23
23
"github.com/hyperledger/fabric/common/configtx/test"
24
24
"github.com/hyperledger/fabric/common/ledger/testutil"
25
25
util2 "github.com/hyperledger/fabric/common/util"
26
+ "github.com/hyperledger/fabric/core/common/sysccprovider"
26
27
"github.com/hyperledger/fabric/core/ledger/ledgermgmt"
27
28
"github.com/hyperledger/fabric/core/ledger/util"
28
29
ledgerUtil "github.com/hyperledger/fabric/core/ledger/util"
@@ -214,12 +215,12 @@ func TestGetTxCCInstance(t *testing.T) {
214
215
payload , err := utils .GetPayload (env )
215
216
assert .NoError (t , err )
216
217
217
- expectInvokeCCIns := & ChaincodeInstance {
218
+ expectInvokeCCIns := & sysccprovider. ChaincodeInstance {
218
219
ChainID : chainID ,
219
220
ChaincodeName : "lscc" ,
220
221
ChaincodeVersion : "" ,
221
222
}
222
- expectUpgradeCCIns := & ChaincodeInstance {
223
+ expectUpgradeCCIns := & sysccprovider. ChaincodeInstance {
223
224
ChainID : chainID ,
224
225
ChaincodeName : upgradeCCName ,
225
226
ChaincodeVersion : upgradeCCVersion ,
@@ -235,20 +236,20 @@ func TestGetTxCCInstance(t *testing.T) {
235
236
}
236
237
237
238
func TestInvalidTXsForUpgradeCC (t * testing.T ) {
238
- txsChaincodeNames := map [int ]* ChaincodeInstance {
239
- 0 : & ChaincodeInstance {"chain0" , "cc0" , "v0" }, // invoke cc0/chain0:v0, should not be affected by upgrade tx in other chain
240
- 1 : & ChaincodeInstance {"chain1" , "cc0" , "v0" }, // invoke cc0/chain1:v0, should be invalided by cc1/chain1 upgrade tx
241
- 2 : & ChaincodeInstance {"chain1" , "lscc" , "" }, // upgrade cc0/chain1 to v1, should be invalided by latter cc0/chain1 upgtade tx
242
- 3 : & ChaincodeInstance {"chain1" , "cc0" , "v0" }, // invoke cc0/chain1:v0, should be invalided by cc1/chain1 upgrade tx
243
- 4 : & ChaincodeInstance {"chain1" , "cc0" , "v1" }, // invoke cc0/chain1:v1, should be invalided by cc1/chain1 upgrade tx
244
- 5 : & ChaincodeInstance {"chain1" , "cc1" , "v0" }, // invoke cc1/chain1:v0, should not be affected by other chaincode upgrade tx
245
- 6 : & ChaincodeInstance {"chain1" , "lscc" , "" }, // upgrade cc0/chain1 to v2, should be invalided by latter cc0/chain1 upgtade tx
246
- 7 : & ChaincodeInstance {"chain1" , "lscc" , "" }, // upgrade cc0/chain1 to v3
239
+ txsChaincodeNames := map [int ]* sysccprovider. ChaincodeInstance {
240
+ 0 : & sysccprovider. ChaincodeInstance {"chain0" , "cc0" , "v0" }, // invoke cc0/chain0:v0, should not be affected by upgrade tx in other chain
241
+ 1 : & sysccprovider. ChaincodeInstance {"chain1" , "cc0" , "v0" }, // invoke cc0/chain1:v0, should be invalided by cc1/chain1 upgrade tx
242
+ 2 : & sysccprovider. ChaincodeInstance {"chain1" , "lscc" , "" }, // upgrade cc0/chain1 to v1, should be invalided by latter cc0/chain1 upgtade tx
243
+ 3 : & sysccprovider. ChaincodeInstance {"chain1" , "cc0" , "v0" }, // invoke cc0/chain1:v0, should be invalided by cc1/chain1 upgrade tx
244
+ 4 : & sysccprovider. ChaincodeInstance {"chain1" , "cc0" , "v1" }, // invoke cc0/chain1:v1, should be invalided by cc1/chain1 upgrade tx
245
+ 5 : & sysccprovider. ChaincodeInstance {"chain1" , "cc1" , "v0" }, // invoke cc1/chain1:v0, should not be affected by other chaincode upgrade tx
246
+ 6 : & sysccprovider. ChaincodeInstance {"chain1" , "lscc" , "" }, // upgrade cc0/chain1 to v2, should be invalided by latter cc0/chain1 upgtade tx
247
+ 7 : & sysccprovider. ChaincodeInstance {"chain1" , "lscc" , "" }, // upgrade cc0/chain1 to v3
247
248
}
248
- upgradedChaincodes := map [int ]* ChaincodeInstance {
249
- 2 : & ChaincodeInstance {"chain1" , "cc0" , "v1" },
250
- 6 : & ChaincodeInstance {"chain1" , "cc0" , "v2" },
251
- 7 : & ChaincodeInstance {"chain1" , "cc0" , "v3" },
249
+ upgradedChaincodes := map [int ]* sysccprovider. ChaincodeInstance {
250
+ 2 : & sysccprovider. ChaincodeInstance {"chain1" , "cc0" , "v1" },
251
+ 6 : & sysccprovider. ChaincodeInstance {"chain1" , "cc0" , "v2" },
252
+ 7 : & sysccprovider. ChaincodeInstance {"chain1" , "cc0" , "v3" },
252
253
}
253
254
254
255
txsfltr := ledgerUtil .NewTxValidationFlags (8 )
0 commit comments