diff --git a/test-network-k8s/scripts/chaincode.sh b/test-network-k8s/scripts/chaincode.sh index c0fec221..54f63312 100755 --- a/test-network-k8s/scripts/chaincode.sh +++ b/test-network-k8s/scripts/chaincode.sh @@ -139,7 +139,9 @@ function invoke_chaincode() { function set_chaincode_id() { local cc_sha256=$(shasum -a 256 build/chaincode/${CHAINCODE_NAME}.tgz | tr -s ' ' | cut -d ' ' -f 1) - CHAINCODE_ID=${CHAINCODE_LABEL}:${cc_sha256} + local label=$( jq -r '.label' chaincode/${CHAINCODE_NAME}/metadata.json) + + CHAINCODE_ID=${label}:${cc_sha256} } # Package and install the chaincode, but do not activate.