Skip to content

Commit dcebaa1

Browse files
committed
[FAB-9870] Use CollectionUpgrade Capab. in lscc
Currently, lscc uses `V1_2Validation` capability to check whether collection upgrades can be allowed. However, the `V1_2Validation` is defined for vscc validation and hence, this CR replace `V1_2Validation` with `CollectionUpgrade` capability. Change-Id: I97021fb7323333879a0f77d6fc2323d93aedb1a0 Signed-off-by: senthil <cendhu@gmail.com>
1 parent aed26a5 commit dcebaa1

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

core/scc/lscc/lscc.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -596,10 +596,7 @@ func (lscc *lifeCycleSysCC) executeUpgrade(stub shim.ChaincodeStubInterface, cha
596596
logger.Panicf("programming error, non-existent appplication config for channel '%s'", chainName)
597597
}
598598

599-
// TODO: Instead of V1_2Validation(), we should be using something like CollectionUpdate().
600-
// For time being, V1_2Validation() is used. Need to submit a separate CR to introduce a
601-
// new capability named CollectionUpdate.
602-
if ac.Capabilities().V1_2Validation() {
599+
if ac.Capabilities().CollectionUpgrade() {
603600
err = lscc.putChaincodeCollectionData(stub, cdfs, collectionConfigBytes)
604601
if err != nil {
605602
return nil, err

core/scc/lscc/lscc_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ func TestUpgrade(t *testing.T) {
515515
ApplicationConfigRv: &config.MockApplication{
516516
CapabilitiesRv: &config.MockApplicationCapabilities{
517517
PrivateChannelDataRv: true,
518-
V1_2ValidationRv: true,
518+
CollectionUpgradeRv: true,
519519
},
520520
},
521521
}).NewSystemChaincodeProvider().(*mscc.MocksccProviderImpl)

0 commit comments

Comments
 (0)