From 5210612b2403393f148f5e9eb3811e6ab2b1a023 Mon Sep 17 00:00:00 2001 From: Alessandro Marcelletti Date: Sat, 20 Jan 2024 15:15:56 +0000 Subject: [PATCH] fixed varaible for contract update --- test-network/scripts/ccutils.sh | 2 +- test-network/scripts/deployCC.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test-network/scripts/ccutils.sh b/test-network/scripts/ccutils.sh index 762eaf5..656670b 100644 --- a/test-network/scripts/ccutils.sh +++ b/test-network/scripts/ccutils.sh @@ -34,7 +34,7 @@ function queryInstalled() { function approveForMyOrg() { ORG=$1 setGlobals $ORG - CC_SEQUENCE=1 + CC_SEQUENCE=$2 set -x peer lifecycle chaincode approveformyorg -o localhost:7050 --ordererTLSHostnameOverride orderer.quotation.com --tls --cafile "$ORDERER_CA" --channelID $CHANNEL_NAME --name ${CC_NAME} --version ${CC_VERSION} --package-id ${PACKAGE_ID} --sequence ${CC_SEQUENCE} ${INIT_REQUIRED} ${CC_END_POLICY} ${CC_COLL_CONFIG} >&log.txt res=$? diff --git a/test-network/scripts/deployCC.sh b/test-network/scripts/deployCC.sh index 85a1ad1..9fba384 100644 --- a/test-network/scripts/deployCC.sh +++ b/test-network/scripts/deployCC.sh @@ -90,7 +90,7 @@ resolveSequence infoln "Deploy into channel q1channel" ## approve the definition for SupplierA -approveForMyOrg 1 +approveForMyOrg 1 $CC_SEQUENCE ## check whether the chaincode definition is ready to be committed ## expect SupplierA to have approved and Agency not to @@ -98,7 +98,7 @@ checkCommitReadiness 1 "\"SupplierAMSP\": true" "\"AgencyMSP\": false" checkCommitReadiness 3 "\"SupplierAMSP\": true" "\"AgencyMSP\": false" ## now approve also for Agency -approveForMyOrg 3 +approveForMyOrg 3 $CC_SEQUENCE ## check whether the chaincode definition is ready to be committed ## expect them both to have approved @@ -109,7 +109,7 @@ checkCommitReadiness 3 "\"SupplierAMSP\": true" "\"AgencyMSP\": true" commitChaincodeDefinition 1 3 ## query on both orgs to see that the definition committed successfully -queryCommitted 1 +queryCommitted 1 queryCommitted 3 ## Invoke the chaincode - this does require that the chaincode have the 'initLedger' @@ -126,7 +126,7 @@ CHANNEL_NAME="q2channel" infoln "Deploy into channel q2channel" ## approve the definition for SupplierB -approveForMyOrg 2 +approveForMyOrg 2 $CC_SEQUENCE ## check whether the chaincode definition is ready to be committed ## expect SupplierA to have approved and Agency not to @@ -134,7 +134,7 @@ checkCommitReadiness 2 "\"SupplierBMSP\": true" "\"AgencyMSP\": false" checkCommitReadiness 3 "\"SupplierBMSP\": true" "\"AgencyMSP\": false" ## now approve also for Agency -approveForMyOrg 3 +approveForMyOrg 3 $CC_SEQUENCE ## check whether the chaincode definition is ready to be committed ## expect them both to have approved