Skip to content

Commit

Permalink
Merge pull request #74 from davidkel/fixbug
Browse files Browse the repository at this point in the history
address issue from update orderer node
  • Loading branch information
davidkel authored Dec 2, 2021
2 parents ebab2ef + 842ca19 commit 5ce332a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions fabric-network/docker-based-syschannel/network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export VERBOSE=false

. scripts/utils.sh

# Create channel-artifacts here otherwise docker will create the dir as root which then causes other stuff to fail
if [ ! -d "channel-artifacts" ]; then
mkdir channel-artifacts
fi

# Obtain CONTAINER_IDS and remove them
# TODO Might want to make this optional - could clear other containers
# This function is called when you bring a network down
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ VERBOSE="$4"
: ${MAX_RETRY:="5"}
: ${VERBOSE:="false"}

if [ ! -d "channel-artifacts" ]; then
mkdir channel-artifacts
fi

createChannelTx() {
set -x
configtxgen -profile ApplicationGenesis -outputCreateChannelTx ./channel-artifacts/${CHANNEL_NAME}.tx -channelID $CHANNEL_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ createAnchorPeerUpdate() {
}

updateAnchorPeer() {
timestamp
set -x
peer channel update -o localhost:7050 --ordererTLSHostnameOverride orderer1.example.com -c $CHANNEL_NAME -f ${CORE_PEER_LOCALMSPID}anchors.tx --tls --cafile $ORDERER_CA >&log.txt
res=$?
{ set +x; } 2>/dev/null
cat log.txt
verifyResult $res "Anchor peer update failed"
successln "Anchor peer set for org '$CORE_PEER_LOCALMSPID' on channel '$CHANNEL_NAME'"
successln "$(timestamp) Anchor peer set for org '$CORE_PEER_LOCALMSPID' on channel '$CHANNEL_NAME'"
}

ORG=$1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ signConfigtxAsPeerOrg 2 org4_update_in_envelope.pb

infoln "Submitting transaction from a different peer (peer0.org3) which also signs it"
setGlobals 3
timestamp
set -x
peer channel update -f org4_update_in_envelope.pb -c ${CHANNEL_NAME} -o localhost:7050 --ordererTLSHostnameOverride orderer1.example.com --tls --cafile "$ORDERER_CA"
{ set +x; } 2>/dev/null

successln "Config transaction to add org4 to network submitted"
successln "$(timestamp) Config transaction to add org4 to network submitted"

0 comments on commit 5ce332a

Please sign in to comment.