Skip to content

Commit

Permalink
Merge "Fix incorrect usage of DeployChaincode in integration"
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-linux authored and Gerrit Code Review committed Nov 28, 2018
2 parents ae094c9 + 9b429c9 commit b63ba8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion integration/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ var _ = Describe("EndToEnd", func() {
nwo.DeployChaincode(network, "testchannel1", orderer, chaincode)

network.CreateAndJoinChannel(orderer, "testchannel2")
nwo.DeployChaincode(network, "testchannel2", orderer, chaincode)
nwo.InstantiateChaincode(network, "testchannel2", orderer, chaincode, peer)

RunQueryInvokeQuery(network, orderer, peer, "testchannel1")
RunQueryInvokeQuery(network, orderer, peer, "testchannel2")
Expand Down
4 changes: 4 additions & 0 deletions integration/nwo/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ type Chaincode struct {
// DeployChaincode is a helper that will install chaincode to all peers that
// are connected to the specified channel, instantiate the chaincode on one of
// the peers, and wait for the instantiation to complete on all of the peers.
//
// NOTE: This helper should not be used to deploy the same chaincode on
// multiple channels as the install will fail on subsequent calls. Instead,
// simply use InstantiateChaincode().
func DeployChaincode(n *Network, channel string, orderer *Orderer, chaincode Chaincode, peers ...*Peer) {
if len(peers) == 0 {
peers = n.PeersWithChannel(channel)
Expand Down

0 comments on commit b63ba8d

Please sign in to comment.