@@ -3623,26 +3623,19 @@ chaincodeList() {
36233623
36243624 peerChaincodeListTls " cli.org1.example.com" " peer0.org1.example.com:7061" " $2" " crypto-orderer/tlsca.orderer1.com-cert.pem" # Third argument is channel name
36253625
3626- elif
3627- [ " $1" = " peer1.org1.example.com" ]
3628- then
3626+ elif [ " $1" = " peer1.org1.example.com" ]; then
36293627
36303628 peerChaincodeListTls " cli.org1.example.com" " peer1.org1.example.com:7062" " $2" " crypto-orderer/tlsca.orderer1.com-cert.pem" # Third argument is channel name
36313629
3632- elif
3633- [ " $1" = " peer0.org2.example.com" ]
3634- then
3630+ elif [ " $1" = " peer0.org2.example.com" ]; then
36353631
36363632 peerChaincodeListTls " cli.org2.example.com" " peer0.org2.example.com:7081" " $2" " crypto-orderer/tlsca.orderer1.com-cert.pem" # Third argument is channel name
36373633
3638- elif
3639- [ " $1" = " peer1.org2.example.com" ]
3640- then
3634+ elif [ " $1" = " peer1.org2.example.com" ]; then
36413635
36423636 peerChaincodeListTls " cli.org2.example.com" " peer1.org2.example.com:7082" " $2" " crypto-orderer/tlsca.orderer1.com-cert.pem" # Third argument is channel name
36433637
36443638 else
3645-
36463639 echo " Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2"
36473640 exit 1
36483641
@@ -3806,28 +3799,19 @@ channelQuery() {
38063799
38073800 peerChannelListTls " cli.org1.example.com" " peer0.org1.example.com:7061" " crypto-orderer/tlsca.orderer1.com-cert.pem"
38083801
3809- elif
3810- [ " $1" = " list" ] && [ " $2" = " org1" ] && [ " $3" = " peer1" ]
3811- then
3802+ elif [ " $1" = " list" ] && [ " $2" = " org1" ] && [ " $3" = " peer1" ]; then
38123803
38133804 peerChannelListTls " cli.org1.example.com" " peer1.org1.example.com:7062" " crypto-orderer/tlsca.orderer1.com-cert.pem"
38143805
3815- elif
3816- [ " $1" = " list" ] && [ " $2" = " org2" ] && [ " $3" = " peer0" ]
3817- then
3806+ elif [ " $1" = " list" ] && [ " $2" = " org2" ] && [ " $3" = " peer0" ]; then
38183807
38193808 peerChannelListTls " cli.org2.example.com" " peer0.org2.example.com:7081" " crypto-orderer/tlsca.orderer1.com-cert.pem"
38203809
3821- elif
3822- [ " $1" = " list" ] && [ " $2" = " org2" ] && [ " $3" = " peer1" ]
3823- then
3810+ elif [ " $1" = " list" ] && [ " $2" = " org2" ] && [ " $3" = " peer1" ]; then
38243811
38253812 peerChannelListTls " cli.org2.example.com" " peer1.org2.example.com:7082" " crypto-orderer/tlsca.orderer1.com-cert.pem"
38263813
3827- elif
3828-
3829- [ " $1" = " getinfo" ] && [ " $2" = " my-channel1" ] && [ " $3" = " org1" ] && [ " $4" = " peer0" ]
3830- then
3814+ elif [ " $1" = " getinfo" ] && [ " $2" = " my-channel1" ] && [ " $3" = " org1" ] && [ " $4" = " peer0" ]; then
38313815
38323816 peerChannelGetInfoTls " my-channel1" " cli.org1.example.com" " peer0.org1.example.com:7061" " crypto-orderer/tlsca.orderer1.com-cert.pem"
38333817
@@ -3842,9 +3826,7 @@ channelQuery() {
38423826
38433827 peerChannelFetchBlockTls " my-channel1" " cli.org1.example.com" " \$ {BLOCK_NAME}" " peer0.org1.example.com:7061" " crypto-orderer/tlsca.orderer1.com-cert.pem" " $TARGET_FILE"
38443828
3845- elif
3846- [ " $1" = " getinfo" ] && [ " $2" = " my-channel1" ] && [ " $3" = " org2" ] && [ " $4" = " peer0" ]
3847- then
3829+ elif [ " $1" = " getinfo" ] && [ " $2" = " my-channel1" ] && [ " $3" = " org2" ] && [ " $4" = " peer0" ]; then
38483830
38493831 peerChannelGetInfoTls " my-channel1" " cli.org2.example.com" " peer0.org2.example.com:7081" " crypto-orderer/tlsca.orderer1.com-cert.pem"
38503832
@@ -3859,9 +3841,7 @@ channelQuery() {
38593841
38603842 peerChannelFetchBlockTls " my-channel1" " cli.org2.example.com" " \$ {BLOCK_NAME}" " peer0.org2.example.com:7081" " crypto-orderer/tlsca.orderer1.com-cert.pem" " $TARGET_FILE"
38613843
3862- elif
3863- [ " $1" = " getinfo" ] && [ " $2" = " my-channel2" ] && [ " $3" = " org1" ] && [ " $4" = " peer1" ]
3864- then
3844+ elif [ " $1" = " getinfo" ] && [ " $2" = " my-channel2" ] && [ " $3" = " org1" ] && [ " $4" = " peer1" ]; then
38653845
38663846 peerChannelGetInfoTls " my-channel2" " cli.org1.example.com" " peer1.org1.example.com:7062" " crypto-orderer/tlsca.orderer1.com-cert.pem"
38673847
@@ -3876,9 +3856,7 @@ channelQuery() {
38763856
38773857 peerChannelFetchBlockTls " my-channel2" " cli.org1.example.com" " \$ {BLOCK_NAME}" " peer1.org1.example.com:7062" " crypto-orderer/tlsca.orderer1.com-cert.pem" " $TARGET_FILE"
38783858
3879- elif
3880- [ " $1" = " getinfo" ] && [ " $2" = " my-channel2" ] && [ " $3" = " org2" ] && [ " $4" = " peer1" ]
3881- then
3859+ elif [ " $1" = " getinfo" ] && [ " $2" = " my-channel2" ] && [ " $3" = " org2" ] && [ " $4" = " peer1" ]; then
38823860
38833861 peerChannelGetInfoTls " my-channel2" " cli.org2.example.com" " peer1.org2.example.com:7082" " crypto-orderer/tlsca.orderer1.com-cert.pem"
38843862
@@ -3893,9 +3871,7 @@ channelQuery() {
38933871
38943872 peerChannelFetchBlockTls " my-channel2" " cli.org2.example.com" " \$ {BLOCK_NAME}" " peer1.org2.example.com:7082" " crypto-orderer/tlsca.orderer1.com-cert.pem" " $TARGET_FILE"
38953873
3896- elif
3897- [ " $1" = " getinfo" ] && [ " $2" = " my-channel3" ] && [ " $3" = " org1" ] && [ " $4" = " peer0" ]
3898- then
3874+ elif [ " $1" = " getinfo" ] && [ " $2" = " my-channel3" ] && [ " $3" = " org1" ] && [ " $4" = " peer0" ]; then
38993875
39003876 peerChannelGetInfoTls " my-channel3" " cli.org1.example.com" " peer0.org1.example.com:7061" " crypto-orderer/tlsca.orderer2.com-cert.pem"
39013877
@@ -3910,9 +3886,7 @@ channelQuery() {
39103886
39113887 peerChannelFetchBlockTls " my-channel3" " cli.org1.example.com" " \$ {BLOCK_NAME}" " peer0.org1.example.com:7061" " crypto-orderer/tlsca.orderer2.com-cert.pem" " $TARGET_FILE"
39123888
3913- elif
3914- [ " $1" = " getinfo" ] && [ " $2" = " my-channel3" ] && [ " $3" = " org1" ] && [ " $4" = " peer1" ]
3915- then
3889+ elif [ " $1" = " getinfo" ] && [ " $2" = " my-channel3" ] && [ " $3" = " org1" ] && [ " $4" = " peer1" ]; then
39163890
39173891 peerChannelGetInfoTls " my-channel3" " cli.org1.example.com" " peer1.org1.example.com:7062" " crypto-orderer/tlsca.orderer2.com-cert.pem"
39183892
@@ -3927,9 +3901,7 @@ channelQuery() {
39273901
39283902 peerChannelFetchBlockTls " my-channel3" " cli.org1.example.com" " \$ {BLOCK_NAME}" " peer1.org1.example.com:7062" " crypto-orderer/tlsca.orderer2.com-cert.pem" " $TARGET_FILE"
39293903
3930- elif
3931- [ " $1" = " getinfo" ] && [ " $2" = " my-channel3" ] && [ " $3" = " org2" ] && [ " $4" = " peer0" ]
3932- then
3904+ elif [ " $1" = " getinfo" ] && [ " $2" = " my-channel3" ] && [ " $3" = " org2" ] && [ " $4" = " peer0" ]; then
39333905
39343906 peerChannelGetInfoTls " my-channel3" " cli.org2.example.com" " peer0.org2.example.com:7081" " crypto-orderer/tlsca.orderer2.com-cert.pem"
39353907
@@ -3944,9 +3916,7 @@ channelQuery() {
39443916
39453917 peerChannelFetchBlockTls " my-channel3" " cli.org2.example.com" " \$ {BLOCK_NAME}" " peer0.org2.example.com:7081" " crypto-orderer/tlsca.orderer2.com-cert.pem" " $TARGET_FILE"
39463918
3947- elif
3948- [ " $1" = " getinfo" ] && [ " $2" = " my-channel3" ] && [ " $3" = " org2" ] && [ " $4" = " peer1" ]
3949- then
3919+ elif [ " $1" = " getinfo" ] && [ " $2" = " my-channel3" ] && [ " $3" = " org2" ] && [ " $4" = " peer1" ]; then
39503920
39513921 peerChannelGetInfoTls " my-channel3" " cli.org2.example.com" " peer1.org2.example.com:7082" " crypto-orderer/tlsca.orderer2.com-cert.pem"
39523922
@@ -3962,7 +3932,6 @@ channelQuery() {
39623932 peerChannelFetchBlockTls " my-channel3" " cli.org2.example.com" " \$ {BLOCK_NAME}" " peer1.org2.example.com:7082" " crypto-orderer/tlsca.orderer2.com-cert.pem" " $TARGET_FILE"
39633933
39643934 else
3965-
39663935 echo " $@"
39673936 echo " $1, $2, $3, $4, $5, $6, $7, $#"
39683937 printChannelsHelp
0 commit comments