From 4b1e6b782561b8cd2a4dc7c985d260d585548531 Mon Sep 17 00:00:00 2001 From: David Enyeart Date: Wed, 7 Oct 2020 03:41:15 -0400 Subject: [PATCH] Fix chaincode lifecycle tutorial invoke The tutorial had a typo in the chaincode invoke and query commands. The chaincode functions in the samples start with capitals now. Signed-off-by: David Enyeart --- docs/source/deploy_chaincode.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/deploy_chaincode.md b/docs/source/deploy_chaincode.md index 3db316fd843..0c42dfd318f 100644 --- a/docs/source/deploy_chaincode.md +++ b/docs/source/deploy_chaincode.md @@ -456,7 +456,7 @@ Version: 1.0, Sequence: 1, Endorsement Plugin: escc, Validation Plugin: vscc, Ap After the chaincode definition has been committed to a channel, the chaincode will start on the peers joined to the channel where the chaincode was installed. The asset-transfer (basic) chaincode is now ready to be invoked by client applications. Use the following command create an initial set of assets on the ledger. Note that the invoke command needs target a sufficient number of peers to meet chaincode endorsement policy. ``` -peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile ${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"function":"initLedger","Args":[]}' +peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile ${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051 --tlsRootCertFiles ${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"function":"InitLedger","Args":[]}' ``` If the command is successful, you should be able to a response similar to the following: ``` @@ -465,7 +465,7 @@ If the command is successful, you should be able to a response similar to the fo We can use a query function to read the set of cars that were created by the chaincode: ``` -peer chaincode query -C mychannel -n basic -c '{"Args":["getAllAssets"]}' +peer chaincode query -C mychannel -n basic -c '{"Args":["GetAllAssets"]}' ``` The response to the query should be the following list of assets: