-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use renamed CheckCommitReadiness function
FAB-16111 #done Change-Id: Iacdbd59515b71cb692935b0afbd1c678e0f55851 Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
- Loading branch information
Showing
6 changed files
with
64 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
interest_rate_swaps/network/scripts/check-commit-readiness.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# Copyright IBM Corp All Rights Reserved | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
checkCommitReadiness() { | ||
echo "===================== Check the commit readiness of the chaincode definition for ${CORE_PEER_LOCALMSPID} ===================== " | ||
local rc=1 | ||
local starttime=$(date +%s) | ||
|
||
# continue to poll | ||
# we either get a successful response, or reach TIMEOUT | ||
while | ||
test "$(($(date +%s) - starttime))" -lt "$TIMEOUT" -a $rc -ne 0 | ||
do | ||
echo "Attempting to check the commit readiness of the chaincode definition for ${CORE_PEER_LOCALMSPID} ...$(($(date +%s) - starttime)) secs" | ||
set -x | ||
peer lifecycle chaincode checkcommitreadiness -o irs-orderer:7050 --channelID irs --signature-policy "AND(OR('partya.peer','partyb.peer','partyc.peer'), 'auditor.peer')" --name irscc --version 1 --init-required --sequence 1 >&log.txt | ||
res=$? | ||
set +x | ||
test $res -eq 0 || continue | ||
let rc=0 | ||
for var in "$@" | ||
do | ||
grep "$var" log.txt &>/dev/null || let rc=1 | ||
done | ||
done | ||
echo | ||
cat log.txt | ||
if test $rc -eq 0; then | ||
echo "===================== Checking the commit readiness of the chaincode definition successful for ${CORE_PEER_LOCALMSPID} ===================== " | ||
else | ||
echo "!!!!!!!!!!!!!!! Check commit readiness result for ${CORE_PEER_LOCALMSPID} is INVALID !!!!!!!!!!!!!!!!" | ||
echo "================== ERROR !!! FAILED to execute End-2-End Scenario ==================" | ||
echo | ||
exit 1 | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.