Skip to content

Commit

Permalink
a dev chaincode must provide chaincode id
Browse files Browse the repository at this point in the history
output error when chaincodename==""

Change-Id: I12661bf5001981af139a75cef0445f9be327213c
Signed-off-by: xiejunan <xiejunan@huawei.com>
  • Loading branch information
xiejunan committed Aug 31, 2016
1 parent a087441 commit 25f6eaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/chaincode/shim/chaincode.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ func Start(cc Chaincode) error {
}

chaincodename := viper.GetString("chaincode.id.name")
if chaincodename == "" {
return fmt.Errorf("Error chaincode id not provided")
}
err = chatWithPeer(chaincodename, stream, cc)

return err
Expand Down

0 comments on commit 25f6eaf

Please sign in to comment.