Skip to content

Commit

Permalink
[FAB-3616] Renaming the generateChaincode func
Browse files Browse the repository at this point in the history
The func actually generate a ChaincodeDeploymentSpec.

Change-Id: Ia3a3b71cf30a33b58a1cbdb3aec19f44da8a933e
Signed-off-by: Baohua Yang <baohyang@cn.ibm.com>
  • Loading branch information
yeasy committed Jun 2, 2017
1 parent f68f939 commit 669358b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions peer/chaincode/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ func install(msg proto.Message, cf *ChaincodeCmdFactory) error {
return nil
}

//generateChaincode creates ChaincodeDeploymentSpec as the package to install
func generateChaincode(cmd *cobra.Command, chaincodeName, chaincodeVersion string) (*pb.ChaincodeDeploymentSpec, error) {
//genChaincodeDeploymentSpec creates ChaincodeDeploymentSpec as the package to install
func genChaincodeDeploymentSpec(cmd *cobra.Command, chaincodeName, chaincodeVersion string) (*pb.ChaincodeDeploymentSpec, error) {
if existed, _ := ccprovider.ChaincodePackageExists(chaincodeName, chaincodeVersion); existed {
return nil, fmt.Errorf("chaincode %s:%s already exists", chaincodeName, chaincodeVersion)
}
Expand Down Expand Up @@ -167,7 +167,7 @@ func chaincodeInstall(cmd *cobra.Command, ccpackfile string, cf *ChaincodeCmdFac
return fmt.Errorf("Must supply value for %s name, path and version parameters.", chainFuncName)
}
//generate a raw ChaincodeDeploymentSpec
ccpackmsg, err = generateChaincode(cmd, chaincodeName, chaincodeVersion)
ccpackmsg, err = genChaincodeDeploymentSpec(cmd, chaincodeName, chaincodeVersion)
if err != nil {
return err
}
Expand Down

0 comments on commit 669358b

Please sign in to comment.