Skip to content

Commit

Permalink
fixed varaible for contract update
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroMarcellettiUnicam1 committed Jan 20, 2024
1 parent f066db3 commit 5210612
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test-network/scripts/ccutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=$?
Expand Down
10 changes: 5 additions & 5 deletions test-network/scripts/deployCC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ 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
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
Expand All @@ -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'
Expand All @@ -126,15 +126,15 @@ 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
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
Expand Down

0 comments on commit 5210612

Please sign in to comment.