Merge "Fix balance-transfer script" into release-1.4

This commit is contained in:
Simon Stone 2019-04-29 09:24:32 +00:00 committed by Gerrit Code Review
commit f59e563d27

View file

@ -185,7 +185,7 @@ echo
echo "POST invoke chaincode on peers of Org1 and Org2" echo "POST invoke chaincode on peers of Org1 and Org2"
echo echo
curl -s -X POST \ VALUES=$(curl -s -X POST \
http://localhost:4000/channels/mychannel/chaincodes/mycc \ http://localhost:4000/channels/mychannel/chaincodes/mycc \
-H "authorization: Bearer $ORG1_TOKEN" \ -H "authorization: Bearer $ORG1_TOKEN" \
-H "content-type: application/json" \ -H "content-type: application/json" \
@ -193,8 +193,11 @@ curl -s -X POST \
\"peers\": [\"peer0.org1.example.com\",\"peer0.org2.example.com\"], \"peers\": [\"peer0.org1.example.com\",\"peer0.org2.example.com\"],
\"fcn\":\"move\", \"fcn\":\"move\",
\"args\":[\"a\",\"b\",\"10\"] \"args\":[\"a\",\"b\",\"10\"]
}" }")
echo echo $VALUES
# Assign previous invoke transaction id to TRX_ID
MESSAGE=$(echo $VALUES | jq -r ".message")
TRX_ID=${MESSAGE#*ID:}
echo echo
echo "GET query chaincode on peer1 of Org1" echo "GET query chaincode on peer1 of Org1"
@ -213,7 +216,7 @@ BLOCK_INFO=$(curl -s -X GET \
-H "authorization: Bearer $ORG1_TOKEN" \ -H "authorization: Bearer $ORG1_TOKEN" \
-H "content-type: application/json") -H "content-type: application/json")
echo $BLOCK_INFO echo $BLOCK_INFO
# Assign previvious block hash to HASH # Assign previous block hash to HASH
HASH=$(echo $BLOCK_INFO | jq -r ".header.previous_hash") HASH=$(echo $BLOCK_INFO | jq -r ".header.previous_hash")
echo echo