11/*
22Copyright IBM Corp. 2016 All Rights Reserved.
33
4- Licensed under the Apache License, Version 2.0 (the "License");
5- you may not use this file except in compliance with the License.
6- You may obtain a copy of the License at
7-
8- http://www.apache.org/licenses/LICENSE-2.0
9-
10- Unless required by applicable law or agreed to in writing, software
11- distributed under the License is distributed on an "AS IS" BASIS,
12- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- See the License for the specific language governing permissions and
14- limitations under the License.
4+ SPDX-License-Identifier: Apache-2.0
155*/
166
177package txvalidator
@@ -403,9 +393,9 @@ func (v *vsccValidatorImpl) GetInfoForValidate(txid, chID, ccID string) (*sysccp
403393 vscc := & sysccprovider.ChaincodeInstance {ChainID : chID }
404394 var policy []byte
405395 var err error
406- if ccID != "lscc" {
407- // when we are validating any chaincode other than
408- // LSCC , we need to ask LSCC to give us the name
396+ if ! sysccprovider . GetSystemChaincodeProvider (). IsSysCC ( ccID ) {
397+ // when we are validating a chaincode that is not a
398+ // system CC , we need to ask the CC to give us the name
409399 // of VSCC and of the policy that should be used
410400
411401 // obtain name of the VSCC and the policy from LSCC
@@ -420,10 +410,10 @@ func (v *vsccValidatorImpl) GetInfoForValidate(txid, chID, ccID string) (*sysccp
420410 vscc .ChaincodeName = cd .Vscc
421411 policy = cd .Policy
422412 } else {
423- // when we are validating LSCC , we use the default
413+ // when we are validating a system CC , we use the default
424414 // VSCC and a default policy that requires one signature
425415 // from any of the members of the channel
426- cc .ChaincodeName = "lscc"
416+ cc .ChaincodeName = ccID
427417 cc .ChaincodeVersion = coreUtil .GetSysCCVersion ()
428418 vscc .ChaincodeName = "vscc"
429419 p := cauthdsl .SignedByAnyMember (v .support .GetMSPIDs (chID ))
0 commit comments