Skip to content

Commit

Permalink
Fix empty address in peer CLI ClientWait log
Browse files Browse the repository at this point in the history
Log the CORE_PEER_ADDRESS when --peerAddresses flag
is not used.

FAB-18249

Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
  • Loading branch information
wlahti authored and denyeart committed Sep 26, 2020
1 parent 75046cf commit c5cf627
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integration/nwo/deploy.go
Expand Up @@ -246,7 +246,7 @@ func ApproveChaincodeForMyOrg(n *Network, channel string, orderer *Orderer, chai
Expect(err).NotTo(HaveOccurred())
Eventually(sess, n.EventuallyTimeout).Should(gexec.Exit(0))
approvedOrgs[p.Organization] = true
Eventually(sess.Err, n.EventuallyTimeout).Should(gbytes.Say(`\Qcommitted with status (VALID)\E`))
Eventually(sess.Err, n.EventuallyTimeout).Should(gbytes.Say(fmt.Sprintf(`\Qcommitted with status (VALID) at %s\E`, n.PeerAddress(p, ListenPort))))
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion internal/peer/chaincode/common.go
Expand Up @@ -693,9 +693,13 @@ func NewDeliverGroup(
) *DeliverGroup {
clients := make([]*DeliverClient, len(deliverClients))
for i, client := range deliverClients {
address := peerAddresses[i]
if address == "" {
address = viper.GetString("peer.address")
}
dc := &DeliverClient{
Client: client,
Address: peerAddresses[i],
Address: address,
}
clients[i] = dc
}
Expand Down

0 comments on commit c5cf627

Please sign in to comment.