Fix channel create param missing

pull/108/head
Baohua Yang 2017-11-01 20:25:40 +08:00
parent c138ea3aaf
commit 05b6b6382c
2 changed files with 16 additions and 10 deletions

View File

@ -92,17 +92,29 @@ channelCreate() {
echo_b "===================== Create Channel \"$CHANNEL_NAME\" ===================== "
setGlobals 0
if [ -z "$CORE_PEER_TLS_ENABLED" -o "$CORE_PEER_TLS_ENABLED" = "false" ]; then
peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --timeout $TIMEOUT >&log.txt
peer channel create \
-o orderer.example.com:7050 \
-c $CHANNEL_NAME \
-f ./channel-artifacts/channel.tx \
--timeout $TIMEOUT \
>&log.txt
else
peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA --timeout $TIMEOUT >&log.txt
peer channel create \
-o orderer.example.com:7050 \
-c $CHANNEL_NAME \
-f ./channel-artifacts/channel.tx \
--tls $CORE_PEER_TLS_ENABLED \
--cafile $ORDERER_CA \
--timeout $TIMEOUT \
>&log.txt
fi
res=$?
cat log.txt
if [ $res -ne 0 -a $COUNTER -lt $MAX_RETRY ]; then
COUNTER=` expr $COUNTER + 1`
echo_b "PEER$1 failed to create the channel, Retry after 3 seconds"
echo_b "Fail to create channel $CHANNEL_NAME, Retry after 3 seconds"
sleep 3
channelCreate
channelCreate $CHANNEL_NAME
else
COUNTER=1
fi

View File

@ -16,12 +16,6 @@ limitations under the License.
package main
//WARNING - this chaincode's ID is hard-coded in chaincode_example04 to illustrate one way of
//calling chaincode from a chaincode. If this example is modified, chaincode_example04.go has
//to be modified as well with the new ID of chaincode_example02.
//chaincode_example05 show's how chaincode ID can be passed in as a parameter instead of
//hard-coding.
import (
"fmt"
"strconv"