diff --git a/integration/e2e/e2e_test.go b/integration/e2e/e2e_test.go index f101c2fa365..acdee773028 100644 --- a/integration/e2e/e2e_test.go +++ b/integration/e2e/e2e_test.go @@ -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") diff --git a/integration/nwo/deploy.go b/integration/nwo/deploy.go index 8d99cb9a4fc..30284d6b046 100644 --- a/integration/nwo/deploy.go +++ b/integration/nwo/deploy.go @@ -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)