Skip to content

Commit

Permalink
fix up
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Yuan <yy19902439@126.com>
  • Loading branch information
SamYuan1990 committed Mar 30, 2024
1 parent d3e9d2f commit 1872c40
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions test-network/scripts/configUpdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#

# import utils
project_home=${project_home:-${PWD}}
script_home=${project_home}/scripts
test_network_home=${test_network_home:-${PWD}}
script_home=${test_network_home}/scripts
. ${script_home}/envVar.sh

# fetchChannelConfig <org> <channel_id> <output_json>
Expand Down
18 changes: 9 additions & 9 deletions test-network/scripts/envVar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
# This is a collection of bash functions used by different scripts

# imports
project_home=${project_home:-${PWD}}
script_home=${project_home}/scripts
test_network_home=${test_network_home:-${PWD}}
script_home=${test_network_home}/scripts
. ${script_home}/utils.sh

export CORE_PEER_TLS_ENABLED=true
export ORDERER_CA=${project_home}/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem
export PEER0_ORG1_CA=${project_home}/organizations/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
export PEER0_ORG2_CA=${project_home}/organizations/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem
export PEER0_ORG3_CA=${project_home}/organizations/peerOrganizations/org3.example.com/tlsca/tlsca.org3.example.com-cert.pem
export ORDERER_CA=${test_network_home}/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem
export PEER0_ORG1_CA=${test_network_home}/organizations/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
export PEER0_ORG2_CA=${test_network_home}/organizations/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem
export PEER0_ORG3_CA=${test_network_home}/organizations/peerOrganizations/org3.example.com/tlsca/tlsca.org3.example.com-cert.pem

# Set environment variables for the peer org
setGlobals() {
Expand All @@ -30,17 +30,17 @@ setGlobals() {
if [ $USING_ORG -eq 1 ]; then
export CORE_PEER_LOCALMSPID="Org1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG1_CA
export CORE_PEER_MSPCONFIGPATH=${project_home}/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
export CORE_PEER_MSPCONFIGPATH=${test_network_home}/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
export CORE_PEER_ADDRESS=localhost:7051
elif [ $USING_ORG -eq 2 ]; then
export CORE_PEER_LOCALMSPID="Org2MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG2_CA
export CORE_PEER_MSPCONFIGPATH=${project_home}/organizations/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
export CORE_PEER_MSPCONFIGPATH=${test_network_home}/organizations/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
export CORE_PEER_ADDRESS=localhost:9051
elif [ $USING_ORG -eq 3 ]; then
export CORE_PEER_LOCALMSPID="Org3MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG3_CA
export CORE_PEER_MSPCONFIGPATH=${project_home}/organizations/peerOrganizations/org3.example.com/users/Admin@org3.example.com/msp
export CORE_PEER_MSPCONFIGPATH=${test_network_home}/organizations/peerOrganizations/org3.example.com/users/Admin@org3.example.com/msp
export CORE_PEER_ADDRESS=localhost:11051
else
errorln "ORG Unknown"
Expand Down
4 changes: 2 additions & 2 deletions test-network/scripts/org3-scripts/joinChannel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ COUNTER=1
MAX_RETRY=5

# import environment variables
export project_home=..
. ${project_home}/scripts/envVar.sh
export test_network_home=..
. ${test_network_home}/scripts/envVar.sh

# joinChannel ORG
joinChannel() {
Expand Down
4 changes: 2 additions & 2 deletions test-network/scripts/org3-scripts/updateChannelConfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ MAX_RETRY=5


# imports
export project_home=..
. ${project_home}/scripts/configUpdate.sh
export test_network_home=..
. ${test_network_home}/scripts/configUpdate.sh

infoln "Creating config transaction to add org3 to network"

Expand Down

0 comments on commit 1872c40

Please sign in to comment.