docker-compose-files/hyperledger_fabric/v1.0.5/scripts/test_cc_instantiate.sh

17 lines
597 B
Bash
Raw Normal View History

2017-11-24 14:45:16 +08:00
#!/bin/bash
# Importing useful functions for cc testing
if [ -f ./func.sh ]; then
source ./func.sh
elif [ -f scripts/func.sh ]; then
source scripts/func.sh
fi
# Instantiate chaincode on all peers
# Instantiate can only be executed once on any node
2017-12-19 14:40:39 +08:00
echo_b "Instantiating chaincode on channel ${APP_CHANNEL} (once for each channel is enough, we make it concurrent here)..."
chaincodeInstantiate "${APP_CHANNEL}" 1 0 ${CC_NAME} ${CC_INIT_VERSION} ${CC_INIT_ARGS}
chaincodeInstantiate "${APP_CHANNEL}" 2 0 ${CC_NAME} ${CC_INIT_VERSION} ${CC_INIT_ARGS}
2017-11-24 14:45:16 +08:00
echo_g "=== Instantiate chaincode done ==="