Last active
March 8, 2021 00:22
-
-
Save anilhelvaci/a0972d71f67d3223beec9f565f766572 to your computer and use it in GitHub Desktop.
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
echo "---------- Fetching the genesis block of testchannel and joining peer1.Org1.com ----------" | |
export CORE_PEER_LOCALMSPID=Org1 | |
export CORE_PEER_ID=cli | |
export CORE_PEER_ADDRESS=0.0.0.0:8054 | |
export FABRIC_CFG_PATH=$PWD | |
export ORDERER_TLS_CA=$PWD/orderingservice/client/tls-ca-cert.pem | |
export CORE_PEER_TLS_ROOTCERT_FILE=$PWD/Org1/client/tls-ca-cert.pem | |
export CORE_PEER_MSPCONFIGPATH=$PWD/Org1/client/org-ca/orgadmin/msp/ | |
export CORE_PEER_TLS_ENABLED=true | |
export ORDERER_ADDRESS=0.0.0.0:7050 | |
cp $PWD/config.yaml $PWD/Org1/client/org-ca/orgadmin/msp/ | |
peer channel fetch oldest -o $ORDERER_ADDRESS --cafile $ORDERER_TLS_CA --tls -c testchannel $PWD/Org1/peer1/testchannel.genesis.block | |
peer channel join -b $PWD/Org1/peer1/testchannel.genesis.block | |
echo "---------- Fetching the genesis block of testchannel and joining peer1.Org2.com ----------" | |
export CORE_PEER_LOCALMSPID=Org2 | |
export CORE_PEER_ID=cli | |
export CORE_PEER_ADDRESS=0.0.0.0:9054 | |
export FABRIC_CFG_PATH=$PWD | |
export ORDERER_TLS_CA=$PWD/orderingservice/client/tls-ca-cert.pem | |
export CORE_PEER_TLS_ROOTCERT_FILE=$PWD/Org2/client/tls-ca-cert.pem | |
export CORE_PEER_MSPCONFIGPATH=$PWD/Org2/client/org-ca/orgadmin/msp/ | |
export CORE_PEER_TLS_ENABLED=true | |
export ORDERER_ADDRESS=0.0.0.0:7050 | |
cp $PWD/config.yaml $PWD/Org2/client/org-ca/orgadmin/msp/ | |
peer channel fetch oldest -o $ORDERER_ADDRESS --cafile $ORDERER_TLS_CA --tls -c testchannel $PWD/Org2/peer1/testchannel.genesis.block | |
peer channel join -b $PWD/Org2/peer1/testchannel.genesis.block |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment