init function does not exist, it is actually the initLedger the correct one

It was actually the other way around, it is the no TLS line which was wrong and should have ready `initLedger` instead of `init`.

Signed-off-by: Jon <woodyjon@gmail.com>
Signed-off-by: Jonathan Gross <woodyjon@gmail.com>
This commit is contained in:
woodyjon 2020-02-13 16:43:53 +01:00 committed by Jonathan Gross
parent e02e9f4d12
commit 1426592e7b

View file

@ -217,12 +217,12 @@ chaincodeInvokeInit() {
# it using the "-o" option
if [ -z "$CORE_PEER_TLS_ENABLED" -o "$CORE_PEER_TLS_ENABLED" = "false" ]; then
set -x
peer chaincode invoke -o localhost:7050 -C $CHANNEL_NAME -n fabcar $PEER_CONN_PARMS --isInit -c '{"function":"init","Args":[]}' >&log.txt
peer chaincode invoke -o localhost:7050 -C $CHANNEL_NAME -n fabcar $PEER_CONN_PARMS --isInit -c '{"function":"initLedger","Args":[]}' >&log.txt
res=$?
set +x
else
set -x
peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA -C $CHANNEL_NAME -n fabcar $PEER_CONN_PARMS --isInit -c '{"function":"init","Args":[]}' >&log.txt
peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA -C $CHANNEL_NAME -n fabcar $PEER_CONN_PARMS --isInit -c '{"function":"initLedger","Args":[]}' >&log.txt
res=$?
set +x
fi