Commit ac5c5b27 authored by Gari Singh's avatar Gari Singh
Browse files

[FAB-12606] Remove unnecessary CC Type check



It is not actually necessary to specify the
CC type when instantiating chaincode as
CC name and version are actually used to
get the installed chaincode bytes from the
filesytem.

With this change, CCType is no longer checked
at all during instantiate and is therefore no
longer required (which will make things easier
for clients)

Change-Id: Ic1decbf98cf28689f85af94931fa121461ef1e4d
Signed-off-by: default avatarGari Singh <gari.r.singh@gmail.com>
parent 891cd7d9
......@@ -863,9 +863,10 @@ func (lscc *LifeCycleSysCC) Invoke(stub shim.ChaincodeStubInterface) pb.Response
}
depSpec := args[2]
cds, err := utils.GetChaincodeDeploymentSpec(depSpec, lscc.PlatformRegistry)
cds := &pb.ChaincodeDeploymentSpec{}
err := proto.Unmarshal(depSpec, cds)
if err != nil {
return shim.Error(err.Error())
return shim.Error(fmt.Sprintf("error unmarshaling ChaincodeDeploymentSpec: %s", err))
}
// optional arguments here (they can each be nil and may or may not be present)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment