Skip to content

Commit

Permalink
[FAB-12606] Remove unnecessary CC Type check
Browse files Browse the repository at this point in the history
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: Gari Singh <gari.r.singh@gmail.com>
  • Loading branch information
mastersingh24 committed Dec 1, 2018
1 parent 891cd7d commit ac5c5b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/scc/lscc/lscc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ac5c5b2

Please sign in to comment.