2017-12-06 22:30:57 +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
|
|
|
|
|
2018-03-05 14:10:16 +08:00
|
|
|
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
|
|
|
CC_INIT_ARGS=${CC_INIT_ARGS:-$CC_02_INIT_ARGS}
|
|
|
|
|
2018-01-05 14:37:52 +08:00
|
|
|
# Instantiate chaincode in the channel, executed once on any node is enough
|
2018-01-30 15:54:49 +08:00
|
|
|
# (once for each channel is enough, we make it concurrent here)
|
|
|
|
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="
|
|
|
|
|
2018-08-22 17:27:45 +08:00
|
|
|
# Instantiate at org1.peer0 and org2.peer0, actually it can be triggered once per channel
|
2019-05-02 17:30:13 +08:00
|
|
|
chaincodeInstantiate "${APP_CHANNEL}" 1 0 ${ORDERER0_URL} ${CC_NAME} ${CC_INIT_VERSION} ${CC_INIT_ARGS}
|
|
|
|
#chaincodeInstantiate "${APP_CHANNEL}" 2 0 ${ORDERER0_URL} ${CC_NAME} ${CC_INIT_VERSION} ${CC_INIT_ARGS}
|
2018-08-22 17:27:45 +08:00
|
|
|
|
2018-01-30 15:54:49 +08:00
|
|
|
echo_g "=== Instantiate chaincode on channel ${APP_CHANNEL} done ==="
|
|
|
|
|
|
|
|
echo
|