Allow setting cc param from global

pull/117/head
Baohua Yang 2018-03-01 09:49:26 +08:00
parent 8cefe53fff
commit e4df9575a8
18 changed files with 23541 additions and 23092 deletions

View File

@ -8,8 +8,9 @@ elif [ -f scripts/func.sh ]; then
fi
## Install chaincode on all peers
CC_NAME=${CC_02_NAME}
CC_PATH=${CC_02_PATH}
CC_NAME=${CC_NAME:-$CC_02_NAME}
CC_PATH=${CC_PATH:-$CC_02_PATH}
echo_b "=== Installing chaincode ${CC_NAME} on all 4 peers... ==="
for org in "${ORGS[@]}"

View File

@ -7,6 +7,9 @@ elif [ -f scripts/func.sh ]; then
source scripts/func.sh
fi
CC_NAME=${CC_NAME:-$CC_02_NAME}
CC_INIT_ARGS=${CC_INIT_ARGS:-$CC_02_INIT_ARGS}
# Instantiate chaincode in the channel, executed once on any node is enough
# (once for each channel is enough, we make it concurrent here)
echo_b "=== Instantiating chaincode on channel ${APP_CHANNEL}... ==="

View File

@ -7,9 +7,10 @@ elif [ -f scripts/func.sh ]; then
source scripts/func.sh
fi
CC_NAME=${CC_02_NAME}
CC_INVOKE_ARGS=${CC_02_INVOKE_ARGS}
CC_QUERY_ARGS=${CC_02_QUERY_ARGS}
CC_NAME=${CC_NAME:-$CC_02_NAME}
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
#Query on chaincode on Peer0/Org1
echo_g "=== Testing Chaincode invoke/query ==="

View File

@ -7,20 +7,24 @@ elif [ -f scripts/func.sh ]; then
source scripts/func.sh
fi
CC_NAME=${CC_NAME:-$CC_02_NAME}
CC_INVOKE_ARGS=${CC_INVOKE_ARGS:-$CC_02_INVOKE_ARGS}
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
echo_b "Channel name: "${APP_CHANNEL}
echo_b "Query the existing value of a"
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 100
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 100
sleep 1
echo_b "Invoke a transaction to transfer 10 from a to b"
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_INVOKE_ARGS}
chaincodeInvoke ${APP_CHANNEL} 0 ${CC_NAME} ${CC_INVOKE_ARGS}
sleep 1
echo_b "Check if the result of a is 90"
chaincodeQuery ${APP_CHANNEL} 0 ${CC_02_NAME} ${CC_02_QUERY_ARGS} 90
chaincodeQuery ${APP_CHANNEL} 0 ${CC_NAME} ${CC_QUERY_ARGS} 90
echo
echo_g "All GOOD, MVE Test completed"

View File

@ -7,9 +7,11 @@ elif [ -f scripts/func.sh ]; then
source scripts/func.sh
fi
CC_NAME=${CC_02_NAME}
CC_PATH=${CC_02_PATH}
CC_UPGRADE_ARGS=${CC_02_UPGRADE_ARGS}
CC_NAME=${CC_NAME:-$CC_02_NAME}
CC_PATH=${CC_PATH:-$CC_02_PATH}
CC_UPGRADE_ARGS=${CC_UPGRADE_ARGS:-$CC_02_UPGRADE_ARGS}
CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
#Upgrade to new version
echo_b "=== Upgrade chaincode ${CC_NAME} to new version... ==="

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff