test_cc_instantiate.sh 597 B

12345678910111213141516
  1. #!/bin/bash
  2. # Importing useful functions for cc testing
  3. if [ -f ./func.sh ]; then
  4. source ./func.sh
  5. elif [ -f scripts/func.sh ]; then
  6. source scripts/func.sh
  7. fi
  8. # Instantiate chaincode on all peers
  9. # Instantiate can only be executed once on any node
  10. echo_b "Instantiating chaincode on channel ${APP_CHANNEL} (once for each channel is enough, we make it concurrent here)..."
  11. chaincodeInstantiate "${APP_CHANNEL}" 1 0 ${CC_NAME} ${CC_INIT_VERSION} ${CC_INIT_ARGS}
  12. chaincodeInstantiate "${APP_CHANNEL}" 2 0 ${CC_NAME} ${CC_INIT_VERSION} ${CC_INIT_ARGS}
  13. echo_g "=== Instantiate chaincode done ==="