diff --git a/integration/configtx/configtx_test.go b/integration/configtx/configtx_test.go index 740e15d368a..78fd7c291e9 100644 --- a/integration/configtx/configtx_test.go +++ b/integration/configtx/configtx_test.go @@ -17,7 +17,6 @@ import ( docker "github.com/fsouza/go-dockerclient" "github.com/hyperledger/fabric-config/configtx" "github.com/hyperledger/fabric-protos-go-apiv2/common" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/ordererclient" . "github.com/hyperledger/fabric/internal/test" @@ -83,7 +82,7 @@ var _ = Describe("ConfigTx", func() { orderer := network.Orderer("orderer") By("joining all peers to the channel") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) By("getting the current channel config") org2peer0 := network.Peer("Org2", "peer0") diff --git a/integration/devmode/devmode_test.go b/integration/devmode/devmode_test.go index 909ce1b7894..f3cb36d131a 100644 --- a/integration/devmode/devmode_test.go +++ b/integration/devmode/devmode_test.go @@ -15,7 +15,6 @@ import ( "time" docker "github.com/fsouza/go-dockerclient" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" . "github.com/onsi/ginkgo/v2" @@ -100,7 +99,7 @@ var _ = Describe("Devmode", func() { orderer := network.Orderer("orderer") By("setting up the channel") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) By("enabling V2_0 application capabilities") nwo.EnableCapabilities(network, channelName, "Application", "V2_0", orderer, org1peer0) diff --git a/integration/discovery/discovery_test.go b/integration/discovery/discovery_test.go index 021920777d5..9435bea5b2a 100644 --- a/integration/discovery/discovery_test.go +++ b/integration/discovery/discovery_test.go @@ -19,7 +19,6 @@ import ( "github.com/hyperledger/fabric-protos-go-apiv2/discovery" pm "github.com/hyperledger/fabric-protos-go-apiv2/msp" "github.com/hyperledger/fabric/common/policydsl" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" . "github.com/hyperledger/fabric/internal/test" @@ -100,7 +99,7 @@ var _ = Describe("DiscoveryService", func() { peerProcesses = append(peerProcesses, peerProcess) orderer = network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) org1Peer0 = network.Peer("Org1", "peer0") org2Peer0 = network.Peer("Org2", "peer0") @@ -226,7 +225,7 @@ var _ = Describe("DiscoveryService", func() { peerProcesses = append(peerProcesses, peerProcess) orderer = network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) org1Peer0 = network.Peer("Org1", "peer0") org2Peer0 = network.Peer("Org2", "peer0") diff --git a/integration/e2e/acl_test.go b/integration/e2e/acl_test.go index 514cd721e24..51da5d4b7b8 100644 --- a/integration/e2e/acl_test.go +++ b/integration/e2e/acl_test.go @@ -17,7 +17,6 @@ import ( "github.com/hyperledger/fabric-protos-go-apiv2/common" pb "github.com/hyperledger/fabric-protos-go-apiv2/peer" "github.com/hyperledger/fabric/core/aclmgmt/resources" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/protoutil" @@ -69,7 +68,7 @@ var _ = Describe("EndToEndACL", func() { org1Peer0 = network.Peer("Org1", "peer0") org2Peer0 = network.Peer("Org2", "peer0") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) }) AfterEach(func() { diff --git a/integration/e2e/chaincode_server_test.go b/integration/e2e/chaincode_server_test.go index 168e0ba85c8..34c8a7211a7 100644 --- a/integration/e2e/chaincode_server_test.go +++ b/integration/e2e/chaincode_server_test.go @@ -17,7 +17,6 @@ import ( "github.com/hyperledger/fabric/common/crypto/tlsgen" "github.com/hyperledger/fabric/core/container/externalbuilder" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -68,7 +67,7 @@ var _ = Describe("ChaincodeAsExternalServer", func() { // Setup the network ordererRunner, ordererProcess, peerProcess = network.StartSingleOrdererNetwork("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", network.Orderer("orderer"), ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", network.Orderer("orderer"), ordererRunner) nwo.EnableCapabilities( network, diff --git a/integration/e2e/e2e_test.go b/integration/e2e/e2e_test.go index e9e8d2bcb99..46c54fa6483 100644 --- a/integration/e2e/e2e_test.go +++ b/integration/e2e/e2e_test.go @@ -26,7 +26,6 @@ import ( docker "github.com/fsouza/go-dockerclient" "github.com/hyperledger/fabric-lib-go/healthz" "github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/integration/nwo/fabricconfig" @@ -168,13 +167,13 @@ var _ = Describe("EndToEnd", func() { }) Expect(err).NotTo(HaveOccurred()) Eventually(sess).Should(gexec.Exit(0)) - var channelList channelparticipation.ChannelList + var channelList nwo.ChannelList err = json.Unmarshal(sess.Out.Contents(), &channelList) Expect(err).NotTo(HaveOccurred()) - Expect(channelList).To(Equal(channelparticipation.ChannelList{})) + Expect(channelList).To(Equal(nwo.ChannelList{})) By("setting up the channel") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) By("listing channels with osnadmin") sess, err = network.Osnadmin(commands.ChannelList{ @@ -187,8 +186,8 @@ var _ = Describe("EndToEnd", func() { Eventually(sess).Should(gexec.Exit(0)) err = json.Unmarshal(sess.Out.Contents(), &channelList) Expect(err).NotTo(HaveOccurred()) - Expect(channelList).To(Equal(channelparticipation.ChannelList{ - Channels: []channelparticipation.ChannelInfoShort{{ + Expect(channelList).To(Equal(nwo.ChannelList{ + Channels: []nwo.ChannelInfoShort{{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", }}, @@ -242,7 +241,7 @@ var _ = Describe("EndToEnd", func() { CheckOrdererStatsdMetrics("ordererorg_orderer", metricsReader, 2*metricsWriteInterval) By("setting up another channel from a the same profile") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "another-testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "another-testchannel", orderer, ordererRunner) By("listing channels with osnadmin") sess, err = network.Osnadmin(commands.ChannelList{ @@ -258,8 +257,8 @@ var _ = Describe("EndToEnd", func() { sort.Slice(channelList.Channels, func(i, j int) bool { return channelList.Channels[i].Name < channelList.Channels[j].Name }) - Expect(channelList).To(Equal(channelparticipation.ChannelList{ - Channels: []channelparticipation.ChannelInfoShort{ + Expect(channelList).To(Equal(nwo.ChannelList{ + Channels: []nwo.ChannelInfoShort{ { Name: "another-testchannel", URL: "/participation/v1/channels/another-testchannel", @@ -319,10 +318,10 @@ var _ = Describe("EndToEnd", func() { orderer := network.Orderer("orderer") By("setting up the channel") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) - cl := channelparticipation.List(network, orderer) - channelparticipation.ChannelListMatcher(cl, []string{"testchannel"}) + cl := nwo.List(network, orderer) + nwo.ChannelListMatcher(cl, []string{"testchannel"}) nwo.EnableCapabilities(network, "testchannel", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) @@ -446,7 +445,7 @@ var _ = Describe("EndToEnd", func() { orderer := network.Orderer("orderer") By("Create first channel and deploy the chaincode") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) nwo.EnableCapabilities(network, "testchannel", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) nwo.DeployChaincode(network, "testchannel", orderer, chaincode) @@ -454,10 +453,10 @@ var _ = Describe("EndToEnd", func() { RunQueryInvokeQuery(network, orderer, peer, "testchannel") By("Create second channel and deploy chaincode") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel2", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel2", orderer, ordererRunner) - cl := channelparticipation.List(network, orderer) - channelparticipation.ChannelListMatcher(cl, []string{"testchannel", "testchannel2"}) + cl := nwo.List(network, orderer) + nwo.ChannelListMatcher(cl, []string{"testchannel", "testchannel2"}) nwo.EnableCapabilities(network, "testchannel2", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) peers := network.PeersWithChannel("testchannel2") @@ -532,7 +531,7 @@ var _ = Describe("EndToEnd", func() { It("creates and updates channel", func() { orderer := network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) // The below call waits for the config update to commit on the peer, so // it will fail if the orderer addresses are wrong. @@ -568,7 +567,7 @@ var _ = Describe("EndToEnd", func() { orderer := network.Orderer("orderer") By("creating and joining channels") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) By("enabling new lifecycle capabilities") nwo.EnableCapabilities(network, "testchannel", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) @@ -658,7 +657,7 @@ var _ = Describe("EndToEnd", func() { orderer := network.Orderer("orderer") By("creating and joining channels") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) By("enabling new lifecycle capabilities") nwo.EnableCapabilities(network, "testchannel", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) diff --git a/integration/e2e/filter_proposal_test.go b/integration/e2e/filter_proposal_test.go index 99dedcca47d..55944d4ce41 100644 --- a/integration/e2e/filter_proposal_test.go +++ b/integration/e2e/filter_proposal_test.go @@ -18,7 +18,6 @@ import ( "github.com/hyperledger/fabric-protos-go-apiv2/common" "github.com/hyperledger/fabric-protos-go-apiv2/gateway" "github.com/hyperledger/fabric-protos-go-apiv2/peer" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/protoutil" . "github.com/onsi/ginkgo/v2" @@ -92,7 +91,7 @@ var _ = Describe("FilterProposalTimeWindow", func() { orderer := network.Orderer("orderer") By("setting up the channel") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) By("enabling new lifecycle capabilities") nwo.EnableCapabilities(network, "testchannel", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) diff --git a/integration/e2e/write_batch_test.go b/integration/e2e/write_batch_test.go index cc21ec88467..055be2d2841 100644 --- a/integration/e2e/write_batch_test.go +++ b/integration/e2e/write_batch_test.go @@ -13,7 +13,6 @@ import ( "syscall" docker "github.com/fsouza/go-dockerclient" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" . "github.com/onsi/ginkgo/v2" @@ -77,7 +76,7 @@ var _ = Describe("Network", func() { It("deploys and executes experiment bench", func() { orderer := network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) peer := network.Peer("Org1", "peer0") chaincode := nwo.Chaincode{ @@ -160,7 +159,7 @@ var _ = Describe("Network", func() { It("put private data for error", func() { orderer := network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) peer := network.Peer("Org1", "peer0") chaincode := nwo.Chaincode{ @@ -235,7 +234,7 @@ var _ = Describe("Network", func() { It("deploys and executes experiment bench", func() { orderer := network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) peer := network.Peer("Org1", "peer0") chaincode := nwo.Chaincode{ diff --git a/integration/gateway/endorsing_orgs_test.go b/integration/gateway/endorsing_orgs_test.go index 6fe1f72f0be..98911957377 100644 --- a/integration/gateway/endorsing_orgs_test.go +++ b/integration/gateway/endorsing_orgs_test.go @@ -15,7 +15,6 @@ import ( docker "github.com/fsouza/go-dockerclient" "github.com/hyperledger/fabric-protos-go-apiv2/gateway" "github.com/hyperledger/fabric-protos-go-apiv2/peer" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" . "github.com/hyperledger/fabric/internal/test" "github.com/hyperledger/fabric/protoutil" @@ -55,7 +54,7 @@ var _ = Describe("GatewayService with endorsing orgs", func() { ordererRunner, ordererProcess, peerProcess = network.StartSingleOrdererNetwork("orderer") orderer = network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) network.VerifyMembership( network.PeersWithChannel("testchannel"), diff --git a/integration/gateway/gateway_bft_test.go b/integration/gateway/gateway_bft_test.go index 9c312bf10e8..774df747b94 100644 --- a/integration/gateway/gateway_bft_test.go +++ b/integration/gateway/gateway_bft_test.go @@ -18,7 +18,6 @@ import ( "github.com/hyperledger/fabric-protos-go-apiv2/common" "github.com/hyperledger/fabric-protos-go-apiv2/gateway" "github.com/hyperledger/fabric-protos-go-apiv2/peer" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" . "github.com/onsi/ginkgo/v2" @@ -374,7 +373,7 @@ func joinChannel(network *nwo.Network, channel string) { err = proto.Unmarshal(genesisBlockBytes, genesisBlock) Expect(err).NotTo(HaveOccurred()) - expectedChannelInfoPT := channelparticipation.ChannelInfo{ + expectedChannelInfoPT := nwo.ChannelInfo{ Name: channel, URL: "/participation/v1/channels/" + channel, Status: "active", @@ -384,8 +383,8 @@ func joinChannel(network *nwo.Network, channel string) { for _, o := range network.Orderers { By("joining " + o.Name + " to channel as a consenter") - channelparticipation.Join(network, o, channel, genesisBlock, expectedChannelInfoPT) - channelInfo := channelparticipation.ListOne(network, o, channel) + nwo.Join(network, o, channel, genesisBlock, expectedChannelInfoPT) + channelInfo := nwo.ListOne(network, o, channel) Expect(channelInfo).To(Equal(expectedChannelInfoPT)) } } diff --git a/integration/gateway/gateway_discovery_test.go b/integration/gateway/gateway_discovery_test.go index c76283f5cad..147d7a08088 100644 --- a/integration/gateway/gateway_discovery_test.go +++ b/integration/gateway/gateway_discovery_test.go @@ -15,7 +15,6 @@ import ( docker "github.com/fsouza/go-dockerclient" "github.com/hyperledger/fabric-protos-go-apiv2/gateway" "github.com/hyperledger/fabric-protos-go-apiv2/peer" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/protoutil" . "github.com/onsi/ginkgo/v2" @@ -62,7 +61,7 @@ var _ = Describe("GatewayService with endorser discovery", func() { ordererRunner, ordererProcess, peerProcess = network.StartSingleOrdererNetwork("orderer") orderer = network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) network.VerifyMembership( network.PeersWithChannel("testchannel"), diff --git a/integration/gateway/gateway_test.go b/integration/gateway/gateway_test.go index 2baaed31172..9546ca34062 100644 --- a/integration/gateway/gateway_test.go +++ b/integration/gateway/gateway_test.go @@ -19,7 +19,6 @@ import ( "github.com/hyperledger/fabric-protos-go-apiv2/orderer" "github.com/hyperledger/fabric-protos-go-apiv2/peer" "github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" . "github.com/hyperledger/fabric/internal/test" "github.com/hyperledger/fabric/protoutil" @@ -107,7 +106,7 @@ var _ = Describe("GatewayService basic", func() { By("setting up the channel") orderer := network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) network.VerifyMembership( network.PeersWithChannel("testchannel"), diff --git a/integration/gossip/gossip_test.go b/integration/gossip/gossip_test.go index ffdae5b5672..95cad83995e 100644 --- a/integration/gossip/gossip_test.go +++ b/integration/gossip/gossip_test.go @@ -20,7 +20,6 @@ import ( "time" docker "github.com/fsouza/go-dockerclient" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" . "github.com/onsi/ginkgo/v2" @@ -127,7 +126,7 @@ var _ = Describe("Gossip State Transfer and Membership", func() { By("bringing up all four peers") startPeers(nwprocs, false, peer0Org1, peer1Org1, peer0Org2, peer1Org2) - channelparticipation.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner) + nwo.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner) By("joining all peers to channel") network.JoinChannel(channelName, orderer, peer0Org1, peer1Org1, peer0Org2, peer1Org2) @@ -239,7 +238,7 @@ var _ = Describe("Gossip State Transfer and Membership", func() { startPeers(nwprocs, false, peer0Org1, peer1Org1) By("creating and joining a channel") - channelparticipation.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner) + nwo.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner) network.JoinChannel(channelName, orderer, peer0Org1, peer1Org1) @@ -272,7 +271,7 @@ var _ = Describe("Gossip State Transfer and Membership", func() { startPeers(nwprocs, false, peer0Org1, peer1Org1, peer0Org2, peer1Org2) By("creating and joining a channel") - channelparticipation.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner) + nwo.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner) network.JoinChannel(channelName, orderer, peer0Org1, peer1Org1, peer0Org2, peer1Org2) By("verifying membership on peer1Org1") @@ -305,7 +304,7 @@ var _ = Describe("Gossip State Transfer and Membership", func() { By("bringing up a peer in each organization") startPeers(nwprocs, false, peer0Org1, peer0Org2) - channelparticipation.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner) + nwo.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner) By("joining peers to channel") network.JoinChannel(channelName, orderer, peer0Org1, peer0Org2) diff --git a/integration/idemix/idemix_test.go b/integration/idemix/idemix_test.go index 5460078ca2b..8bf24569098 100644 --- a/integration/idemix/idemix_test.go +++ b/integration/idemix/idemix_test.go @@ -12,7 +12,6 @@ import ( "syscall" docker "github.com/fsouza/go-dockerclient" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" . "github.com/onsi/ginkgo/v2" @@ -86,7 +85,7 @@ var _ = Describe("EndToEnd", func() { orderer := network.Orderer("orderer") By("setting up the channel") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) nwo.EnableCapabilities(network, "testchannel", "Application", "V2_0", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) By("deploying the chaincode") diff --git a/integration/ledger/couchdb_indexes_test.go b/integration/ledger/couchdb_indexes_test.go index 9d0866adecf..4f0b406fa26 100644 --- a/integration/ledger/couchdb_indexes_test.go +++ b/integration/ledger/couchdb_indexes_test.go @@ -13,7 +13,6 @@ import ( "syscall" docker "github.com/fsouza/go-dockerclient" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/integration/nwo/fabricconfig" @@ -101,7 +100,7 @@ var _ = Describe("CouchDB indexes", func() { By("setting up the channel") orderer = network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) network.VerifyMembership(network.PeersWithChannel("testchannel"), "testchannel") chaincode = nwo.Chaincode{ diff --git a/integration/ledger/reset_rollback_test.go b/integration/ledger/reset_rollback_test.go index a7fdf2e8556..d379d71845b 100644 --- a/integration/ledger/reset_rollback_test.go +++ b/integration/ledger/reset_rollback_test.go @@ -17,7 +17,6 @@ import ( docker "github.com/fsouza/go-dockerclient" "github.com/hyperledger/fabric-protos-go-apiv2/common" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" . "github.com/onsi/ginkgo/v2" @@ -352,7 +351,7 @@ func initThreeOrgsSetup() *setup { setup.startPeer(peers[1]) setup.startPeer(peers[2]) - channelparticipation.JoinOrdererJoinPeersAppChannel(n, "testchannel", setup.orderer, setup.ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(n, "testchannel", setup.orderer, setup.ordererRunner) n.UpdateOrgAnchorPeers(setup.orderer, testchannelID, "Org1", n.PeersInOrg("Org1")) n.UpdateOrgAnchorPeers(setup.orderer, testchannelID, "Org2", n.PeersInOrg("Org2")) n.UpdateOrgAnchorPeers(setup.orderer, testchannelID, "Org3", n.PeersInOrg("Org3")) diff --git a/integration/ledger/snapshot_test.go b/integration/ledger/snapshot_test.go index 6f099111d6c..af0e82aea7f 100644 --- a/integration/ledger/snapshot_test.go +++ b/integration/ledger/snapshot_test.go @@ -25,7 +25,6 @@ import ( pb "github.com/hyperledger/fabric-protos-go-apiv2/peer" "github.com/hyperledger/fabric/core/ledger/util" "github.com/hyperledger/fabric/integration/chaincode/kvexecutor" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/integration/nwo/runner" @@ -638,7 +637,7 @@ func initAndStartFourOrgsNetwork() *setup { setup.startPeers() By("creating and joining testchannel") - channelparticipation.JoinOrdererJoinPeersAppChannel(setup.network, "testchannel", setup.orderer, setup.ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(setup.network, "testchannel", setup.orderer, setup.ordererRunner) By("verifying membership for testchannel") n.VerifyMembership(n.PeersWithChannel(testchannelID), testchannelID) diff --git a/integration/lifecycle/capabilities_endorse_test.go b/integration/lifecycle/capabilities_endorse_test.go index bc7930a0e10..65b56271c3b 100644 --- a/integration/lifecycle/capabilities_endorse_test.go +++ b/integration/lifecycle/capabilities_endorse_test.go @@ -18,7 +18,6 @@ import ( "syscall" docker "github.com/fsouza/go-dockerclient" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/raft" . "github.com/onsi/ginkgo/v2" @@ -120,7 +119,7 @@ var _ = Describe("Lifecycle with Channel v3_0 capabilities and ed25519 identitie Eventually(o3Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) By("joining ECDSA orderers to testchannel") - channelparticipation.JoinOrderersAppChannelCluster(network, channelID, orderer1, orderer2, orderer3) + nwo.JoinOrderersAppChannelCluster(network, channelID, orderer1, orderer2, orderer3) By("waiting for raft leader on testchannel") raft.FindLeader(ordererRunners) @@ -232,7 +231,7 @@ var _ = Describe("Lifecycle with Channel v3_0 capabilities and ed25519 identitie ordererProcs = []ifrit.Process{ordererProc} By("joining orderer to testchannel") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, channelID, orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, channelID, orderer, ordererRunner) network.VerifyMembership(network.PeersWithChannel(channelID), channelID) By("setting up the channel with v3_0 capabilities and without the ed25519 peer") diff --git a/integration/lifecycle/install_test.go b/integration/lifecycle/install_test.go index 98996b75833..0946e58b74f 100644 --- a/integration/lifecycle/install_test.go +++ b/integration/lifecycle/install_test.go @@ -12,7 +12,6 @@ import ( "syscall" docker "github.com/fsouza/go-dockerclient" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/integration/nwo/fabricconfig" @@ -87,7 +86,7 @@ var _ = Describe("chaincode install", func() { orderer = network.Orderer("orderer") org1Peer = network.Peer("Org1", "peer0") org2Peer = network.Peer("Org2", "peer0") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) chaincode = nwo.Chaincode{ Name: "failure-external", diff --git a/integration/lifecycle/interop_test.go b/integration/lifecycle/interop_test.go index 8c63a37c2f3..aa329db0214 100644 --- a/integration/lifecycle/interop_test.go +++ b/integration/lifecycle/interop_test.go @@ -15,7 +15,6 @@ import ( docker "github.com/fsouza/go-dockerclient" ab "github.com/hyperledger/fabric-protos-go-apiv2/orderer" pb "github.com/hyperledger/fabric-protos-go-apiv2/peer" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/protoutil" @@ -97,7 +96,7 @@ var _ = Describe("Release interoperability", func() { } By("joining the channel") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) By("enabling V2_0 application capabilities") nwo.EnableCapabilities(network, "testchannel", "Application", "V2_0", orderer, endorsers...) @@ -187,7 +186,7 @@ var _ = Describe("Release interoperability", func() { It("deploys a chaincode with the new lifecycle, invokes it and the tx is committed only after the chaincode is upgraded via _lifecycle", func() { By("enabling V2_0 application capabilities") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) nwo.EnableCapabilities(network, "testchannel", "Application", "V2_0", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) By("deploying the chaincode definition using _lifecycle") @@ -267,7 +266,7 @@ var _ = Describe("Release interoperability", func() { Ctor: `{"Args":[""]}`, } By("Creating and joining the channel") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) }) It("Deploys two chaincodes with the new lifecycle and performs a successful cc2cc invocation", func() { @@ -321,7 +320,7 @@ var _ = Describe("Release interoperability", func() { Expect(sess).To(gbytes.Say("callee:bar")) By("enabling the 2.0 capability on channel2") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel2", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel2", orderer, ordererRunner) nwo.EnableCapabilities(network, "testchannel2", "Application", "V2_0", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) By("deploying the callee chaincode using _lifecycle on channel2") diff --git a/integration/lifecycle/lifecycle_test.go b/integration/lifecycle/lifecycle_test.go index 1a4fd515306..f409847c74b 100644 --- a/integration/lifecycle/lifecycle_test.go +++ b/integration/lifecycle/lifecycle_test.go @@ -16,7 +16,6 @@ import ( "github.com/hyperledger/fabric-config/protolator" "github.com/hyperledger/fabric-config/protolator/protoext/peerext" "github.com/hyperledger/fabric-protos-go-apiv2/common" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/integration/nwo/fabricconfig" @@ -139,7 +138,7 @@ var _ = Describe("Lifecycle", func() { } By("setting up the channel") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) network.VerifyMembership(network.PeersWithChannel("testchannel"), "testchannel") nwo.EnableCapabilities(network, "testchannel", "Application", "V2_0", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) diff --git a/integration/msp/msp_test.go b/integration/msp/msp_test.go index a1bbf0fe569..3f232bfefaf 100644 --- a/integration/msp/msp_test.go +++ b/integration/msp/msp_test.go @@ -14,7 +14,6 @@ import ( "syscall" docker "github.com/fsouza/go-dockerclient" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" . "github.com/onsi/ginkgo/v2" @@ -82,7 +81,7 @@ var _ = Describe("MSP identity test on a network with mutual TLS required", func orderer := network.Orderer("orderer") By("creating and joining channels") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) By("enabling new lifecycle capabilities") nwo.EnableCapabilities(network, "testchannel", "Application", "V2_0", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) diff --git a/integration/msp/rsaca_test.go b/integration/msp/rsaca_test.go index 9a0694b8812..bc96a8ba3b2 100644 --- a/integration/msp/rsaca_test.go +++ b/integration/msp/rsaca_test.go @@ -25,7 +25,6 @@ import ( "time" docker "github.com/fsouza/go-dockerclient" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" fabricmsp "github.com/hyperledger/fabric/msp" @@ -112,7 +111,7 @@ var _ = Describe("MSPs with RSA Certificate Authorities", func() { Label: "my_prebuilt_chaincode", } - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) nwo.EnableCapabilities( network, diff --git a/integration/channelparticipation/channel_participation.go b/integration/nwo/channel_participation.go similarity index 85% rename from integration/channelparticipation/channel_participation.go rename to integration/nwo/channel_participation.go index ae70c82d9b6..31ec2e99946 100644 --- a/integration/channelparticipation/channel_participation.go +++ b/integration/nwo/channel_participation.go @@ -4,7 +4,7 @@ Copyright IBM Corp All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -package channelparticipation +package nwo import ( "bytes" @@ -16,7 +16,6 @@ import ( "time" "github.com/hyperledger/fabric-protos-go-apiv2/common" - "github.com/hyperledger/fabric/integration/nwo" "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" @@ -26,7 +25,7 @@ import ( "google.golang.org/protobuf/proto" ) -func Join(n *nwo.Network, o *nwo.Orderer, channel string, block *common.Block, expectedChannelInfo ChannelInfo) { +func Join(n *Network, o *Orderer, channel string, block *common.Block, expectedChannelInfo ChannelInfo) { blockBytes, err := proto.Marshal(block) Expect(err).NotTo(HaveOccurred()) @@ -34,9 +33,9 @@ func Join(n *nwo.Network, o *nwo.Orderer, channel string, block *common.Block, e if n.TLSEnabled { protocol = "https" } - url := fmt.Sprintf("%s://127.0.0.1:%d/participation/v1/channels", protocol, n.OrdererPort(o, nwo.AdminPort)) + url := fmt.Sprintf("%s://127.0.0.1:%d/participation/v1/channels", protocol, n.OrdererPort(o, AdminPort)) req := GenerateJoinRequest(url, channel, blockBytes) - authClient, unauthClient := nwo.OrdererOperationalClients(n, o) + authClient, unauthClient := OrdererOperationalClients(n, o) client := unauthClient if n.TLSEnabled { @@ -87,14 +86,14 @@ type ChannelInfoShort struct { URL string `json:"url"` } -func List(n *nwo.Network, o *nwo.Orderer) ChannelList { - authClient, _ := nwo.OrdererOperationalClients(n, o) +func List(n *Network, o *Orderer) ChannelList { + authClient, _ := OrdererOperationalClients(n, o) protocol := "http" if n.TLSEnabled { protocol = "https" } - listChannelsURL := fmt.Sprintf("%s://127.0.0.1:%d/participation/v1/channels", protocol, n.OrdererPort(o, nwo.AdminPort)) + listChannelsURL := fmt.Sprintf("%s://127.0.0.1:%d/participation/v1/channels", protocol, n.OrdererPort(o, AdminPort)) body := getBody(authClient, listChannelsURL)() list := &ChannelList{} @@ -123,14 +122,14 @@ type ChannelInfo struct { Height uint64 `json:"height"` } -func ListOne(n *nwo.Network, o *nwo.Orderer, channel string) ChannelInfo { - authClient, _ := nwo.OrdererOperationalClients(n, o) +func ListOne(n *Network, o *Orderer, channel string) ChannelInfo { + authClient, _ := OrdererOperationalClients(n, o) protocol := "http" if n.TLSEnabled { protocol = "https" } - listChannelURL := fmt.Sprintf("%s://127.0.0.1:%d/participation/v1/channels/%s", protocol, n.OrdererPort(o, nwo.AdminPort), channel) + listChannelURL := fmt.Sprintf("%s://127.0.0.1:%d/participation/v1/channels/%s", protocol, n.OrdererPort(o, AdminPort), channel) body := getBody(authClient, listChannelURL)() c := &ChannelInfo{} @@ -139,14 +138,14 @@ func ListOne(n *nwo.Network, o *nwo.Orderer, channel string) ChannelInfo { return *c } -func Remove(n *nwo.Network, o *nwo.Orderer, channel string) { - authClient, _ := nwo.OrdererOperationalClients(n, o) +func Remove(n *Network, o *Orderer, channel string) { + authClient, _ := OrdererOperationalClients(n, o) protocol := "http" if n.TLSEnabled { protocol = "https" } - url := fmt.Sprintf("%s://127.0.0.1:%d/participation/v1/channels/%s", protocol, n.OrdererPort(o, nwo.AdminPort), channel) + url := fmt.Sprintf("%s://127.0.0.1:%d/participation/v1/channels/%s", protocol, n.OrdererPort(o, AdminPort), channel) req, err := http.NewRequest(http.MethodDelete, url, nil) Expect(err).NotTo(HaveOccurred()) @@ -184,7 +183,7 @@ func channelInfoShortMatcher(channel string) types.GomegaMatcher { // JoinOrdererJoinPeersAppChannel Joins an orderer to a channel for which the genesis block was created by the network // bootstrap. It assumes a channel with one orderer. It waits for a leader (single orderer, always node=1), and then // joins all the peers to the channel. -func JoinOrdererJoinPeersAppChannel(network *nwo.Network, channelID string, orderer *nwo.Orderer, ordererRunner *ginkgomon.Runner) { +func JoinOrdererJoinPeersAppChannel(network *Network, channelID string, orderer *Orderer, ordererRunner *ginkgomon.Runner) { appGenesisBlock := network.LoadAppChannelGenesisBlock(channelID) expectedChannelInfo := ChannelInfo{ Name: channelID, @@ -206,7 +205,7 @@ func JoinOrdererJoinPeersAppChannel(network *nwo.Network, channelID string, orde // JoinOrdererAppChannel Joins an orderer to a channel for which the genesis block was created by the network // bootstrap. It assumes a channel with one orderer. It waits for a leader (single orderer, always node=1). -func JoinOrdererAppChannel(network *nwo.Network, channelID string, orderer *nwo.Orderer, ordererRunner *ginkgomon.Runner) { +func JoinOrdererAppChannel(network *Network, channelID string, orderer *Orderer, ordererRunner *ginkgomon.Runner) { appGenesisBlock := network.LoadAppChannelGenesisBlock(channelID) expectedChannelInfo := ChannelInfo{ Name: channelID, @@ -224,7 +223,7 @@ func JoinOrdererAppChannel(network *nwo.Network, channelID string, orderer *nwo. // JoinOrderersAppChannelCluster Joins a set of orderers to a channel for which the genesis block was created by the network // bootstrap. It assumes a channel with one or more orderers (a cluster). -func JoinOrderersAppChannelCluster(network *nwo.Network, channelID string, orderers ...*nwo.Orderer) { +func JoinOrderersAppChannelCluster(network *Network, channelID string, orderers ...*Orderer) { appGenesisBlock := network.LoadAppChannelGenesisBlock(channelID) for _, orderer := range orderers { expectedChannelInfo := ChannelInfo{ diff --git a/integration/nwo/network_test.go b/integration/nwo/network_test.go index 5cadd45f190..8be09076ac4 100644 --- a/integration/nwo/network_test.go +++ b/integration/nwo/network_test.go @@ -13,7 +13,6 @@ import ( "syscall" docker "github.com/fsouza/go-dockerclient" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" . "github.com/onsi/ginkgo/v2" @@ -75,7 +74,7 @@ var _ = Describe("Network", func() { It("deploys and executes chaincode (simple) using _lifecycle", func() { orderer := network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) peer := network.Peer("Org1", "peer0") chaincode := nwo.Chaincode{ diff --git a/integration/pkcs11/pkcs11_test.go b/integration/pkcs11/pkcs11_test.go index be9bbe59944..629d1072c78 100644 --- a/integration/pkcs11/pkcs11_test.go +++ b/integration/pkcs11/pkcs11_test.go @@ -23,7 +23,6 @@ import ( "syscall" "time" - "github.com/hyperledger/fabric/integration/channelparticipation" ginkgomon "github.com/tedsuo/ifrit/ginkgomon_v2" bpkcs11 "github.com/hyperledger/fabric-lib-go/bccsp/pkcs11" @@ -93,7 +92,7 @@ var _ = Describe("PKCS11 enabled network", func() { It("executes transactions against a basic etcdraft network", func() { orderer := network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) nwo.EnableCapabilities(network, "testchannel", "Application", "V2_0", orderer, network.PeersWithChannel("testchannel")...) nwo.DeployChaincode(network, "testchannel", orderer, chaincode) @@ -112,7 +111,7 @@ var _ = Describe("PKCS11 enabled network", func() { It("executes transactions against a basic etcdraft network", func() { orderer := network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) nwo.EnableCapabilities(network, "testchannel", "Application", "V2_0", orderer, network.PeersWithChannel("testchannel")...) nwo.DeployChaincode(network, "testchannel", orderer, chaincode) diff --git a/integration/pluggable/pluggable_test.go b/integration/pluggable/pluggable_test.go index fbb95f639c6..b28e4880df0 100644 --- a/integration/pluggable/pluggable_test.go +++ b/integration/pluggable/pluggable_test.go @@ -15,7 +15,6 @@ import ( "time" docker "github.com/fsouza/go-dockerclient" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/integration/nwo/fabricconfig" @@ -91,7 +90,7 @@ var _ = Describe("EndToEnd", func() { Label: "my_prebuilt_chaincode", } orderer := network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) nwo.EnableCapabilities(network, "testchannel", "Application", "V2_0", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0")) nwo.DeployChaincode(network, "testchannel", orderer, chaincode) }) diff --git a/integration/pvtdata/pvtdata_test.go b/integration/pvtdata/pvtdata_test.go index 4932fc972c8..d0ee8289bad 100644 --- a/integration/pvtdata/pvtdata_test.go +++ b/integration/pvtdata/pvtdata_test.go @@ -27,7 +27,6 @@ import ( pb "github.com/hyperledger/fabric-protos-go-apiv2/peer" "github.com/hyperledger/fabric/common/crypto" "github.com/hyperledger/fabric/core/ledger/util" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/integration/pvtdata/marblechaincodeutil" @@ -202,7 +201,7 @@ var _ = Describe("PrivateData", func() { Eventually(p.Ready(), network.EventuallyTimeout).Should(BeClosed()) } - channelparticipation.JoinOrdererJoinPeersAppChannel(network, channelID, orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, channelID, orderer, ordererRunner) By("verifying membership") network.VerifyMembership(network.Peers, channelID) @@ -921,7 +920,7 @@ func startNetwork(n *nwo.Network) (ifrit.Process, ifrit.Process, *nwo.Orderer) { ordererRunner, ordererProcess, peerProcess := n.StartSingleOrdererNetwork("orderer") orderer := n.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(n, channelID, orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(n, channelID, orderer, ordererRunner) By("verifying membership") n.VerifyMembership(n.Peers, channelID) diff --git a/integration/pvtdatapurge/data_purge_test.go b/integration/pvtdatapurge/data_purge_test.go index bb6cd27e838..dcf848aad75 100644 --- a/integration/pvtdatapurge/data_purge_test.go +++ b/integration/pvtdatapurge/data_purge_test.go @@ -20,7 +20,6 @@ import ( "github.com/hyperledger/fabric-protos-go-apiv2/ledger/rwset/kvrwset" ab "github.com/hyperledger/fabric-protos-go-apiv2/orderer" pb "github.com/hyperledger/fabric-protos-go-apiv2/peer" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/integration/pvtdata/marblechaincodeutil" @@ -91,7 +90,7 @@ var _ = Describe("Pvtdata purge", func() { startPeer(network, processes, peerRunners, peer) } - channelparticipation.JoinOrdererJoinPeersAppChannel(network, channelID, orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, channelID, orderer, ordererRunner) network.VerifyMembership( network.PeersWithChannel(channelID), diff --git a/integration/raft/cft_test.go b/integration/raft/cft_test.go index bce739b1359..c3d413019e5 100644 --- a/integration/raft/cft_test.go +++ b/integration/raft/cft_test.go @@ -29,7 +29,6 @@ import ( "github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft" "github.com/hyperledger/fabric/common/configtx" "github.com/hyperledger/fabric/common/util" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/integration/ordererclient" @@ -98,7 +97,7 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { Eventually(o2Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) Eventually(o3Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) FindLeader([]*ginkgomon.Runner{o1Runner, o2Runner, o3Runner}) By("performing operation with orderer1") @@ -157,7 +156,7 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { ordererProc = ifrit.Invoke(oRunner) Eventually(ordererProc.Ready(), network.EventuallyTimeout).Should(BeClosed()) - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", orderer) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", orderer) envs := make(chan *common.Envelope, 5000) @@ -223,7 +222,7 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { By("Creating and joining the channel") channelID := "testchannel" - channelparticipation.JoinOrderersAppChannelCluster(network, channelID, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, channelID, o2, o3) FindLeader([]*ginkgomon.Runner{o2Runner, o3Runner}) By("Submitting several transactions to trigger snapshot") @@ -260,7 +259,7 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { o2Proc = ifrit.Invoke(o2Runner) Eventually(o1Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) Eventually(o2Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) - channelparticipation.JoinOrderersAppChannelCluster(network, channelID, o1) + nwo.JoinOrderersAppChannelCluster(network, channelID, o1) o1SnapDir := path.Join(network.RootDir, "orderers", o1.ID(), "etcdraft", "snapshot") @@ -326,7 +325,7 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { ordererGroup := grouper.NewParallel(syscall.SIGTERM, orderersMembers) ordererProc = ifrit.Invoke(ordererGroup) Eventually(ordererProc.Ready(), network.EventuallyTimeout).Should(BeClosed()) - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", orderers...) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", orderers...) By("Setting up new OSN to be added to the cluster") o4 := &nwo.Orderer{ @@ -365,14 +364,14 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { // Get the last config block of the channel By("Starting joining new ordering service node to the channel") configBlock := nwo.GetConfigBlock(network, peer, orderers[0], "testchannel") - expectedChannelInfo := channelparticipation.ChannelInfo{ + expectedChannelInfo := nwo.ChannelInfo{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, o4, "testchannel", configBlock, expectedChannelInfo) + nwo.Join(network, o4, "testchannel", configBlock, expectedChannelInfo) By("Pick ordering service node to be evicted") victimIdx := FindLeader(ordererRunners) - 1 @@ -528,7 +527,7 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { Eventually(o2Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) Eventually(o3Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) By("Waiting for them to elect a leader") ordererProcesses := []ifrit.Process{o1Proc, o2Proc, o3Proc} @@ -573,7 +572,7 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { Eventually(o1Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) Eventually(o2Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) Eventually(o3Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) By("Waiting for them to elect a leader") ordererProcesses := []ifrit.Process{o1Proc, o2Proc, o3Proc} @@ -715,7 +714,7 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { By("Joining orderers to channel with Admin TLS disabled") // TODO add a test case that ensures the admin client can connect with a time-shift as well network.TLSEnabled = false - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) network.TLSEnabled = true By("Waiting for TLS handshakes to fail") @@ -903,12 +902,12 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { Eventually(o2Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) Eventually(o3Proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) By("Waiting for them to elect a leader") FindLeader(ordererRunners) By("Creating a channel") - channelparticipation.JoinOrderersAppChannelCluster(network, "foo", o1, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, "foo", o1, o2, o3) assertBlockReception(map[string]int{ "foo": 0, @@ -940,7 +939,7 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { FindLeader(ordererRunners) By("Creating a channel again") - channelparticipation.JoinOrderersAppChannelCluster(network, "bar", o1, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, "bar", o1, o2, o3) assertBlockReception(map[string]int{ "foo": 0, @@ -1005,7 +1004,7 @@ var _ = Describe("EndToEnd Crash Fault Tolerance", func() { ordererProc = ifrit.Invoke(runner) By("Joining a channel and waiting for orderer to elect a leader") - channelparticipation.JoinOrdererAppChannel(network, "testchannel", orderer, runner) + nwo.JoinOrdererAppChannel(network, "testchannel", orderer, runner) By("Creating config update that adds another orderer admin") bootBlockPath := filepath.Join(network.RootDir, fmt.Sprintf("%s_block.pb", "testchannel")) diff --git a/integration/raft/channel_participation_test.go b/integration/raft/channel_participation_test.go index 359da388acd..4cc20ed921a 100644 --- a/integration/raft/channel_participation_test.go +++ b/integration/raft/channel_participation_test.go @@ -27,7 +27,6 @@ import ( "github.com/hyperledger/fabric-lib-go/common/metrics/disabled" "github.com/hyperledger/fabric-protos-go-apiv2/common" "github.com/hyperledger/fabric/common/ledger/blockledger/fileledger" - "github.com/hyperledger/fabric/integration/channelparticipation" conftx "github.com/hyperledger/fabric/integration/configtx" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/ordererclient" @@ -99,12 +98,12 @@ var _ = Describe("ChannelParticipation", func() { By("starting all three orderers") for _, o := range orderers { startOrderer(o) - cl := channelparticipation.List(network, o) - Expect(cl).To(Equal(channelparticipation.ChannelList{})) + cl := nwo.List(network, o) + Expect(cl).To(Equal(nwo.ChannelList{})) } genesisBlock := applicationChannelGenesisBlock(network, consenters, []*nwo.Peer{peer}, "participation-trophy") - expectedChannelInfoPT := channelparticipation.ChannelInfo{ + expectedChannelInfoPT := nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -114,12 +113,12 @@ var _ = Describe("ChannelParticipation", func() { for _, o := range consenters { By("joining " + o.Name + " to channel as a consenter") - channelparticipation.Join(network, o, "participation-trophy", genesisBlock, expectedChannelInfoPT) - channelInfo := channelparticipation.ListOne(network, o, "participation-trophy") + nwo.Join(network, o, "participation-trophy", genesisBlock, expectedChannelInfoPT) + channelInfo := nwo.ListOne(network, o, "participation-trophy") Expect(channelInfo).To(Equal(expectedChannelInfoPT)) } - submitPeerTxn(orderer1, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer1, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -127,7 +126,7 @@ var _ = Describe("ChannelParticipation", func() { Height: 2, }) - submitPeerTxn(orderer2, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer2, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -138,20 +137,20 @@ var _ = Describe("ChannelParticipation", func() { By("joining orderer3 to the channel as a follower") // make sure we can join using a config block from one of the other orderers configBlockPT := nwo.GetConfigBlock(network, peer, orderer2, "participation-trophy") - expectedChannelInfoPTFollower := channelparticipation.ChannelInfo{ + expectedChannelInfoPTFollower := nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "onboarding", ConsensusRelation: "follower", Height: 0, } - channelparticipation.Join(network, orderer3, "participation-trophy", configBlockPT, expectedChannelInfoPTFollower) + nwo.Join(network, orderer3, "participation-trophy", configBlockPT, expectedChannelInfoPTFollower) By("ensuring orderer3 completes onboarding successfully") expectedChannelInfoPTFollower.Status = "active" expectedChannelInfoPTFollower.Height = 3 - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer3, "participation-trophy") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer3, "participation-trophy") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPTFollower)) By("adding orderer3 to the consenters set") @@ -164,12 +163,12 @@ var _ = Describe("ChannelParticipation", func() { By("ensuring orderer3 transitions from follower to consenter") // config update above added a block expectedChannelInfoPT.Height = 4 - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer3, "participation-trophy") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer3, "participation-trophy") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPT)) By("submitting transaction to orderer3 to ensure it is active") - submitPeerTxn(orderer3, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer3, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -179,20 +178,20 @@ var _ = Describe("ChannelParticipation", func() { By("joining orderer1 to another channel as a consenter") genesisBlockAPT := applicationChannelGenesisBlock(network, []*nwo.Orderer{orderer1}, []*nwo.Peer{peer}, "another-participation-trophy") - expectedChannelInfoAPT := channelparticipation.ChannelInfo{ + expectedChannelInfoAPT := nwo.ChannelInfo{ Name: "another-participation-trophy", URL: "/participation/v1/channels/another-participation-trophy", Status: "active", ConsensusRelation: "consenter", Height: 1, } - channelparticipation.Join(network, orderer1, "another-participation-trophy", genesisBlockAPT, expectedChannelInfoAPT) - channelInfo := channelparticipation.ListOne(network, orderer1, "another-participation-trophy") + nwo.Join(network, orderer1, "another-participation-trophy", genesisBlockAPT, expectedChannelInfoAPT) + channelInfo := nwo.ListOne(network, orderer1, "another-participation-trophy") Expect(channelInfo).To(Equal(expectedChannelInfoAPT)) By("listing all channels for orderer1") - cl := channelparticipation.List(network, orderer1) - channelparticipation.ChannelListMatcher(cl, []string{"participation-trophy", "another-participation-trophy"}) + cl := nwo.List(network, orderer1) + nwo.ChannelListMatcher(cl, []string{"participation-trophy", "another-participation-trophy"}) By("removing orderer1 from the consenter set") channelConfig = nwo.GetConfig(network, peer, orderer2, "participation-trophy") @@ -202,9 +201,9 @@ var _ = Describe("ChannelParticipation", func() { computeSignSubmitConfigUpdate(network, orderer2, peer, c, "participation-trophy") By("ensuring orderer1 transitions to a follower") - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer1, "participation-trophy") - }, network.EventuallyTimeout).Should(Equal(channelparticipation.ChannelInfo{ + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer1, "participation-trophy") + }, network.EventuallyTimeout).Should(Equal(nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -212,7 +211,7 @@ var _ = Describe("ChannelParticipation", func() { Height: 6, })) - submitPeerTxn(orderer2, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer2, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -221,9 +220,9 @@ var _ = Describe("ChannelParticipation", func() { }) By("ensuring orderer1 pulls the latest block as a follower") - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer1, "participation-trophy") - }, network.EventuallyTimeout).Should(Equal(channelparticipation.ChannelInfo{ + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer1, "participation-trophy") + }, network.EventuallyTimeout).Should(Equal(nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -232,11 +231,11 @@ var _ = Describe("ChannelParticipation", func() { })) By("removing orderer1 from a channel") - channelparticipation.Remove(network, orderer1, "participation-trophy") - Eventually(func() channelparticipation.ChannelList { - return channelparticipation.List(network, orderer1) - }, network.EventuallyTimeout).Should(Equal(channelparticipation.ChannelList{ - Channels: []channelparticipation.ChannelInfoShort{ + nwo.Remove(network, orderer1, "participation-trophy") + Eventually(func() nwo.ChannelList { + return nwo.List(network, orderer1) + }, network.EventuallyTimeout).Should(Equal(nwo.ChannelList{ + Channels: []nwo.ChannelInfoShort{ { Name: "another-participation-trophy", URL: "/participation/v1/channels/another-participation-trophy", @@ -251,25 +250,25 @@ var _ = Describe("ChannelParticipation", func() { Expect(resp.Status).To(Equal(common.Status_BAD_REQUEST)) By("listing all channels for orderer1") - cl = channelparticipation.List(network, orderer1) - channelparticipation.ChannelListMatcher(cl, []string{"another-participation-trophy"}) + cl = nwo.List(network, orderer1) + nwo.ChannelListMatcher(cl, []string{"another-participation-trophy"}) By("joining orderer1 to channel it was previously removed from as consenter") configBlockPT = nwo.GetConfigBlock(network, peer, orderer2, "participation-trophy") - expectedChannelInfoPTFollower = channelparticipation.ChannelInfo{ + expectedChannelInfoPTFollower = nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "onboarding", ConsensusRelation: "follower", Height: 0, } - channelparticipation.Join(network, orderer1, "participation-trophy", configBlockPT, expectedChannelInfoPTFollower) + nwo.Join(network, orderer1, "participation-trophy", configBlockPT, expectedChannelInfoPTFollower) By("ensuring orderer1 completes onboarding successfully") expectedChannelInfoPTFollower.Status = "active" expectedChannelInfoPTFollower.Height = 7 - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer1, "participation-trophy") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer1, "participation-trophy") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPTFollower)) By("adding orderer1 to the consenters set") @@ -280,18 +279,18 @@ var _ = Describe("ChannelParticipation", func() { computeSignSubmitConfigUpdate(network, orderer3, peer, c, "participation-trophy") By("ensuring orderer1 transitions from follower to consenter") - expectedChannelInfoPT = channelparticipation.ChannelInfo{ + expectedChannelInfoPT = nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", ConsensusRelation: "consenter", Height: 8, } - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer1, "participation-trophy") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer1, "participation-trophy") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPT)) - submitPeerTxn(orderer1, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer1, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -300,7 +299,7 @@ var _ = Describe("ChannelParticipation", func() { }) By("ensuring the channel is still usable by submitting a transaction to each remaining consenter for the channel") - submitPeerTxn(orderer2, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer2, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -308,7 +307,7 @@ var _ = Describe("ChannelParticipation", func() { Height: 10, }) - submitPeerTxn(orderer3, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer3, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -336,12 +335,12 @@ var _ = Describe("ChannelParticipation", func() { By("starting two orderers") for _, o := range orderers { startOrderer(o) - cl := channelparticipation.List(network, o) - Expect(cl).To(Equal(channelparticipation.ChannelList{})) + cl := nwo.List(network, o) + Expect(cl).To(Equal(nwo.ChannelList{})) } genesisBlock := applicationChannelGenesisBlock(network, orderers, []*nwo.Peer{peer}, "participation-trophy") - expectedChannelInfoPT := channelparticipation.ChannelInfo{ + expectedChannelInfoPT := nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -351,12 +350,12 @@ var _ = Describe("ChannelParticipation", func() { for _, o := range orderers { By("joining " + o.Name + " to channel as a consenter") - channelparticipation.Join(network, o, "participation-trophy", genesisBlock, expectedChannelInfoPT) - channelInfo := channelparticipation.ListOne(network, o, "participation-trophy") + nwo.Join(network, o, "participation-trophy", genesisBlock, expectedChannelInfoPT) + channelInfo := nwo.ListOne(network, o, "participation-trophy") Expect(channelInfo).To(Equal(expectedChannelInfoPT)) } - submitPeerTxn(orderer1, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer1, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -364,7 +363,7 @@ var _ = Describe("ChannelParticipation", func() { Height: 2, }) - submitPeerTxn(orderer2, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer2, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -384,8 +383,8 @@ var _ = Describe("ChannelParticipation", func() { By("starting third orderer") startOrderer(orderer3) - cl := channelparticipation.List(network, orderer3) - Expect(cl).To(Equal(channelparticipation.ChannelList{})) + cl := nwo.List(network, orderer3) + Expect(cl).To(Equal(nwo.ChannelList{})) By("adding orderer3 to the consenters set") channelConfig = nwo.GetConfig(network, peer, orderer2, "participation-trophy") @@ -397,23 +396,23 @@ var _ = Describe("ChannelParticipation", func() { By("joining orderer3 to the channel as a consenter") // make sure we can join using a config block from one of the other orderers configBlockPT := nwo.GetConfigBlock(network, peer, orderer2, "participation-trophy") - expectedChannelInfoConsenter := channelparticipation.ChannelInfo{ + expectedChannelInfoConsenter := nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, orderer3, "participation-trophy", configBlockPT, expectedChannelInfoConsenter) + nwo.Join(network, orderer3, "participation-trophy", configBlockPT, expectedChannelInfoConsenter) By("ensuring orderer3 completes onboarding successfully") expectedChannelInfoConsenter.Status = "active" expectedChannelInfoConsenter.Height = 5 - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer3, "participation-trophy") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer3, "participation-trophy") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoConsenter)) - submitPeerTxn(orderer3, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer3, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -440,12 +439,12 @@ var _ = Describe("ChannelParticipation", func() { By("starting two orderers") for _, o := range orderers { startOrderer(o) - cl := channelparticipation.List(network, o) - Expect(cl).To(Equal(channelparticipation.ChannelList{})) + cl := nwo.List(network, o) + Expect(cl).To(Equal(nwo.ChannelList{})) } genesisBlock = applicationChannelGenesisBlock(network, orderers, []*nwo.Peer{peer}, "participation-trophy") - expectedChannelInfoPT := channelparticipation.ChannelInfo{ + expectedChannelInfoPT := nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -456,12 +455,12 @@ var _ = Describe("ChannelParticipation", func() { By("joining orderer1 and orderer2 to the channel with a genesis block") for _, o := range orderers { By("joining " + o.Name + " to channel as a consenter") - channelparticipation.Join(network, o, "participation-trophy", genesisBlock, expectedChannelInfoPT) - channelInfo := channelparticipation.ListOne(network, o, "participation-trophy") + nwo.Join(network, o, "participation-trophy", genesisBlock, expectedChannelInfoPT) + channelInfo := nwo.ListOne(network, o, "participation-trophy") Expect(channelInfo).To(Equal(expectedChannelInfoPT)) } - submitPeerTxn(orderer1, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer1, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -469,7 +468,7 @@ var _ = Describe("ChannelParticipation", func() { Height: 2, }) - submitPeerTxn(orderer2, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer2, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -494,25 +493,25 @@ var _ = Describe("ChannelParticipation", func() { It("joins the channel as a follower using a config block", func() { By("starting third orderer") startOrderer(orderer3) - cl := channelparticipation.List(network, orderer3) - Expect(cl).To(Equal(channelparticipation.ChannelList{})) + cl := nwo.List(network, orderer3) + Expect(cl).To(Equal(nwo.ChannelList{})) By("joining orderer3 to the channel as a follower") // make sure we can join using a config block from one of the other orderers - expectedChannelInfoPTFollower := channelparticipation.ChannelInfo{ + expectedChannelInfoPTFollower := nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "onboarding", ConsensusRelation: "follower", Height: 0, } - channelparticipation.Join(network, orderer3, "participation-trophy", configBlock, expectedChannelInfoPTFollower) + nwo.Join(network, orderer3, "participation-trophy", configBlock, expectedChannelInfoPTFollower) By("ensuring orderer3 completes onboarding successfully") expectedChannelInfoPTFollower.Status = "active" expectedChannelInfoPTFollower.Height = 4 - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer3, "participation-trophy") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer3, "participation-trophy") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPTFollower)) By("adding orderer3 to the consenters set") @@ -524,18 +523,18 @@ var _ = Describe("ChannelParticipation", func() { By("ensuring orderer3 transitions from follower to consenter") // config update above added a block - expectedChannelInfoPT := channelparticipation.ChannelInfo{ + expectedChannelInfoPT := nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", ConsensusRelation: "consenter", Height: 5, } - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer3, "participation-trophy") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer3, "participation-trophy") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPT)) - submitPeerTxn(orderer3, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer3, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -559,15 +558,15 @@ var _ = Describe("ChannelParticipation", func() { startOrderer(orderer3) By("ensuring orderer3 completes onboarding successfully") - expectedChannelInfoPTFollower := channelparticipation.ChannelInfo{ + expectedChannelInfoPTFollower := nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", ConsensusRelation: "follower", Height: 4, } - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer3, "participation-trophy") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer3, "participation-trophy") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPTFollower)) }) @@ -591,15 +590,15 @@ var _ = Describe("ChannelParticipation", func() { startOrderer(orderer3) By("ensuring orderer3 completes onboarding successfully") - expectedChannelInfoPTFollower := channelparticipation.ChannelInfo{ + expectedChannelInfoPTFollower := nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", ConsensusRelation: "follower", Height: 4, } - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer3, "participation-trophy") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer3, "participation-trophy") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPTFollower)) }) @@ -628,15 +627,15 @@ var _ = Describe("ChannelParticipation", func() { startOrderer(orderer3) By("ensuring orderer3 completes onboarding successfully") - expectedChannelInfoPTFollower := channelparticipation.ChannelInfo{ + expectedChannelInfoPTFollower := nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", ConsensusRelation: "follower", Height: 4, } - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer3, "participation-trophy") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer3, "participation-trophy") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPTFollower)) By("killing orderer3") @@ -644,7 +643,7 @@ var _ = Describe("ChannelParticipation", func() { Eventually(ordererProcesses[2].Wait(), network.EventuallyTimeout).Should(Receive(MatchError("exit status 137"))) By("submitting transactions while orderer3 is down") - submitPeerTxn(orderer1, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer1, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -652,7 +651,7 @@ var _ = Describe("ChannelParticipation", func() { Height: 5, }) - submitPeerTxn(orderer2, peer, network, channelparticipation.ChannelInfo{ + submitPeerTxn(orderer2, peer, network, nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", @@ -666,15 +665,15 @@ var _ = Describe("ChannelParticipation", func() { Eventually(ordererProcess.Ready(), network.EventuallyTimeout).Should(BeClosed()) ordererProcesses[2] = ordererProcess ordererRunners[2] = ordererRunner - expectedChannelInfoPTFollower = channelparticipation.ChannelInfo{ + expectedChannelInfoPTFollower = nwo.ChannelInfo{ Name: "participation-trophy", URL: "/participation/v1/channels/participation-trophy", Status: "active", ConsensusRelation: "follower", Height: 6, } - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer3, "participation-trophy") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer3, "participation-trophy") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPTFollower)) }) }) @@ -701,27 +700,27 @@ var _ = Describe("ChannelParticipation", func() { // submit a transaction signed by the peer and ensure it was // committed to the ledger -func submitPeerTxn(o *nwo.Orderer, peer *nwo.Peer, n *nwo.Network, expectedChannelInfo channelparticipation.ChannelInfo) { +func submitPeerTxn(o *nwo.Orderer, peer *nwo.Peer, n *nwo.Network, expectedChannelInfo nwo.ChannelInfo) { env := ordererclient.CreateBroadcastEnvelope(n, peer, expectedChannelInfo.Name, []byte("hello")) submitTxn(o, env, n, expectedChannelInfo) } // submit a transaction signed by the orderer and ensure it is // committed to the ledger -func submitOrdererTxn(o *nwo.Orderer, n *nwo.Network, expectedChannelInfo channelparticipation.ChannelInfo) { +func submitOrdererTxn(o *nwo.Orderer, n *nwo.Network, expectedChannelInfo nwo.ChannelInfo) { env := ordererclient.CreateBroadcastEnvelope(n, o, expectedChannelInfo.Name, []byte("hello")) submitTxn(o, env, n, expectedChannelInfo) } // submit the envelope to the orderer and ensure it is committed // to the ledger -func submitTxn(o *nwo.Orderer, env *common.Envelope, n *nwo.Network, expectedChannelInfo channelparticipation.ChannelInfo) { +func submitTxn(o *nwo.Orderer, env *common.Envelope, n *nwo.Network, expectedChannelInfo nwo.ChannelInfo) { By("submitting a transaction to " + o.Name) Eventually(broadcastTransactionFunc(n, o, env), n.EventuallyTimeout, time.Second).Should(Equal(common.Status_SUCCESS)) By("checking the channel info on " + o.Name) - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(n, o, expectedChannelInfo.Name) + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(n, o, expectedChannelInfo.Name) }, n.EventuallyTimeout).Should(Equal(expectedChannelInfo)) } @@ -974,7 +973,7 @@ func channelparticipationJoinFailure(n *nwo.Network, o *nwo.Orderer, channel str protocol = "https" } url := fmt.Sprintf("%s://127.0.0.1:%d/participation/v1/channels", protocol, n.OrdererPort(o, nwo.AdminPort)) - req := channelparticipation.GenerateJoinRequest(url, channel, blockBytes) + req := nwo.GenerateJoinRequest(url, channel, blockBytes) authClient, _ := nwo.OrdererOperationalClients(n, o) doBodyFailure(authClient, req, expectedStatus, expectedError) @@ -990,7 +989,7 @@ func channelparticipationJoinConnectFailure(n *nwo.Network, o *nwo.Orderer, chan } url := fmt.Sprintf("%s://127.0.0.1:%d/participation/v1/channels", protocol, n.OrdererPort(o, nwo.AdminPort)) - req := channelparticipation.GenerateJoinRequest(url, channel, blockBytes) + req := nwo.GenerateJoinRequest(url, channel, blockBytes) authClient, _ := nwo.OrdererOperationalClients(n, o) _, err = authClient.Do(req) diff --git a/integration/raft/config_test.go b/integration/raft/config_test.go index fc1b167a82b..559e42e0be1 100644 --- a/integration/raft/config_test.go +++ b/integration/raft/config_test.go @@ -25,7 +25,6 @@ import ( protosorderer "github.com/hyperledger/fabric-protos-go-apiv2/orderer" "github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft" "github.com/hyperledger/fabric/common/crypto/tlsgen" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/integration/ordererclient" @@ -125,7 +124,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { } By("Creating a new channel, joining all orderers") - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", network.Orderers...) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", network.Orderers...) FindLeader(ordererRunners) // the above can work even if the orderer nodes are not in the same Raft @@ -217,7 +216,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { By("Joining the orderer to a channel") orderer := network.Orderer("orderer") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, odererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, odererRunner) By("Submitting channel config update with illegal value") org1Peer0 := network.Peer("Org1", "peer0") @@ -271,7 +270,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { launch(orderer) By("Joining the orderer to a channel") - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", orderer) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", orderer) By("Checking that it elected itself as a leader") FindLeader(ordererRunners) @@ -313,14 +312,14 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { launch(orderer2) By("Joining the second orderer to the channel, as consenter") - expectedChannelInfo := channelparticipation.ChannelInfo{ + expectedChannelInfo := nwo.ChannelInfo{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, orderer2, "testchannel", configBlock, expectedChannelInfo) + nwo.Join(network, orderer2, "testchannel", configBlock, expectedChannelInfo) By("Waiting for a leader to be re-elected") FindLeader(ordererRunners) @@ -392,14 +391,14 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { configBlock = nwo.GetConfigBlock(network, peer, orderer, "testchannel") By("Joining the third orderer to the channel, as follower") - expectedChannelInfo = channelparticipation.ChannelInfo{ + expectedChannelInfo = nwo.ChannelInfo{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", Status: "onboarding", ConsensusRelation: "follower", Height: 0, } - channelparticipation.Join(network, orderer3, "testchannel", configBlock, expectedChannelInfo) + nwo.Join(network, orderer3, "testchannel", configBlock, expectedChannelInfo) By("Expanding the TLS root CA certificates and adding orderer3 to the channel") updateOrdererMSPAndConsensusMetadata(network, peer, orderer, "testchannel", "OrdererOrg", @@ -421,8 +420,8 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { By("Waiting for orderer3 to see the leader") FindLeader([]*ginkgomon.Runner{ordererRunners[2]}) - Expect(channelparticipation.ListOne(network, orderer3, "testchannel")).To(Equal( - channelparticipation.ChannelInfo{ + Expect(nwo.ListOne(network, orderer3, "testchannel")).To(Equal( + nwo.ChannelInfo{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", Status: "active", @@ -482,7 +481,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { ordererProcesses = append(ordererProcesses, process) By("Joining the orderer to a channel") - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", orderer) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", orderer) Eventually(runner.Err()).Should(gbytes.Say("TickIntervalOverride is set, overriding channel configuration tick interval to 642ms")) }) @@ -512,7 +511,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { } By("Creating a new channel, joining all orderers") - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", network.Orderers...) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", network.Orderers...) By("Finding leader") leader := FindLeader(ordererRunners) @@ -680,7 +679,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { } By("Creating a channel, joining all orderers") - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", network.Orderers...) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", network.Orderers...) By("Finding leader") _ = FindLeader(ordererRunners) @@ -770,10 +769,10 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { Expect(err).NotTo(HaveOccurred()) By("Creating a testchannel2, joining all orderers") - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel2", network.Orderers...) + nwo.JoinOrderersAppChannelCluster(network, "testchannel2", network.Orderers...) By("Creating a testchannel3, joining all orderers") - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel3", network.Orderers...) + nwo.JoinOrderersAppChannelCluster(network, "testchannel3", network.Orderers...) assertBlockReception(map[string]int{ "testchannel2": 0, @@ -837,14 +836,14 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { configBlock := nwo.GetConfigBlock(network, peer, o1, "testchannel") By("Joining the fourth orderer to the channel, as consenter") - expectedChannelInfo := channelparticipation.ChannelInfo{ + expectedChannelInfo := nwo.ChannelInfo{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, o4, "testchannel", configBlock, expectedChannelInfo) + nwo.Join(network, o4, "testchannel", configBlock, expectedChannelInfo) By("And waiting for it to sync with the rest of the orderers") assertBlockReception(map[string]int{ @@ -874,14 +873,14 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { // Get the last config block of the testchannel configBlock = nwo.GetConfigBlock(network, peer, o1, "testchannel2") - expectedChannelInfo = channelparticipation.ChannelInfo{ + expectedChannelInfo = nwo.ChannelInfo{ Name: "testchannel2", URL: "/participation/v1/channels/testchannel2", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, o4, "testchannel2", configBlock, expectedChannelInfo) + nwo.Join(network, o4, "testchannel2", configBlock, expectedChannelInfo) By("Waiting for orderer4 and to replicate testchannel2") assertBlockReception(map[string]int{ @@ -912,14 +911,14 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { // Get the last config block of the testchannel3 configBlock = nwo.GetConfigBlock(network, peer, o1, "testchannel3") - expectedChannelInfo = channelparticipation.ChannelInfo{ + expectedChannelInfo = nwo.ChannelInfo{ Name: "testchannel3", URL: "/participation/v1/channels/testchannel3", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, o4, "testchannel3", configBlock, expectedChannelInfo) + nwo.Join(network, o4, "testchannel3", configBlock, expectedChannelInfo) By("checking the logs that indicate that channel3 cannot be pulled using the delivery service, as the read policy is corrupt") Eventually(orderer4Runner.Err(), network.EventuallyTimeout).Should(gbytes.Say("Received status:FORBIDDEN from 127\\.0\\.0\\.1:[0-9]+: forbidden pulling the channel channel=testchannel3")) @@ -960,13 +959,13 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { } By("Creating testchannel, joining all orderers") - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", network.Orderers...) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", network.Orderers...) By("Finding leader testchannel") _ = FindLeader(ordererRunners) By("Creating mychannel with a subset of orderers") - channelparticipation.JoinOrderersAppChannelCluster(network, "mychannel", o1) + nwo.JoinOrderersAppChannelCluster(network, "mychannel", o1) By("Finding leader mychannel") _ = FindLeader(ordererRunners[:1]) @@ -1004,14 +1003,14 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { configBlock := nwo.GetConfigBlock(network, peer, o1, "mychannel") By("Joining orderer2 to mychannel, as consenter") - expectedChannelInfo := channelparticipation.ChannelInfo{ + expectedChannelInfo := nwo.ChannelInfo{ Name: "mychannel", URL: "/participation/v1/channels/mychannel", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, o2, "mychannel", configBlock, expectedChannelInfo) + nwo.Join(network, o2, "mychannel", configBlock, expectedChannelInfo) By("Waiting for orderer2 to join the channel") assertBlockReception(map[string]int{ @@ -1031,14 +1030,14 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { configBlock = nwo.GetConfigBlock(network, peer, o1, "mychannel") By("Joining orderer3 to mychannel, as consenter") - expectedChannelInfo = channelparticipation.ChannelInfo{ + expectedChannelInfo = nwo.ChannelInfo{ Name: "mychannel", URL: "/participation/v1/channels/mychannel", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, o3, "mychannel", configBlock, expectedChannelInfo) + nwo.Join(network, o3, "mychannel", configBlock, expectedChannelInfo) By("Waiting for orderer3 to join the channel") assertBlockReception(map[string]int{ @@ -1069,7 +1068,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { Eventually(ordererProc.Ready(), network.EventuallyTimeout).Should(BeClosed()) } - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2) }) AfterEach(func() { @@ -1139,7 +1138,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { Eventually(ordererProc.Ready(), network.EventuallyTimeout).Should(BeClosed()) } - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) }) AfterEach(func() { @@ -1191,8 +1190,8 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { By("Ensuring the evicted orderer now doesn't serve clients") ensureNotFound(orderers[firstEvictedNode], peer, network, "testchannel") - assertFollower := func(expected channelparticipation.ChannelInfo, o *nwo.Orderer) bool { - current := channelparticipation.ListOne(network, o, "testchannel") + assertFollower := func(expected nwo.ChannelInfo, o *nwo.Orderer) bool { + current := nwo.ListOne(network, o, "testchannel") ok := current == expected if !ok { fmt.Fprintf(GinkgoWriter, ">>> Current ChannelInfo: %+v \n", current) @@ -1200,7 +1199,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { return ok } - expectedInfo := channelparticipation.ChannelInfo{ + expectedInfo := nwo.ChannelInfo{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", Status: "active", @@ -1222,7 +1221,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { By("Ensuring the evicted orderer now doesn't serve clients") ensureNotFound(orderers[secondEvictedNode], peer, network, "testchannel") - expectedInfo = channelparticipation.ChannelInfo{ + expectedInfo = nwo.ChannelInfo{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", Status: "active", @@ -1325,19 +1324,19 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { } By("Removing channel from the first orderer") - // TODO the channelparticipation.Remove does not clean up the etcdraft folder. This may prevent the + // TODO the nwo.Remove does not clean up the etcdraft folder. This may prevent the // correct re-creation of the channel on this orderer. // See: https://github.com/hyperledger/fabric/issues/3992 ready := make(chan struct{}) go func() { defer GinkgoRecover() - channelparticipation.Remove(network, o1, "testchannel") + nwo.Remove(network, o1, "testchannel") close(ready) }() Eventually(ready, network.EventuallyTimeout).Should(BeClosed()) Eventually(func() int { // Removal is async - channelList := channelparticipation.List(network, o1) + channelList := nwo.List(network, o1) return len(channelList.Channels) }()).Should(BeZero()) @@ -1350,14 +1349,14 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { By("Re-adding the channel to the first orderer") configBlock := nwo.GetConfigBlock(network, peer, o2, "testchannel") - expectedInfo := channelparticipation.ChannelInfo{ + expectedInfo := nwo.ChannelInfo{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, o1, "testchannel", configBlock, expectedInfo) + nwo.Join(network, o1, "testchannel", configBlock, expectedInfo) By("Submitting tx") env := ordererclient.CreateBroadcastEnvelope(network, o2, "testchannel", []byte("foo")) @@ -1366,15 +1365,15 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { Expect(resp.Status).To(Equal(common.Status_SUCCESS)) By("Waiting for the channel to stabilize") - expectedInfo = channelparticipation.ChannelInfo{ + expectedInfo = nwo.ChannelInfo{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", Status: "active", ConsensusRelation: "consenter", Height: 6, } - assertCatchup := func(expected channelparticipation.ChannelInfo) bool { - current := channelparticipation.ListOne(network, o1, "testchannel") + assertCatchup := func(expected nwo.ChannelInfo) bool { + current := nwo.ListOne(network, o1, "testchannel") ok := current == expected if !ok { fmt.Fprintf(GinkgoWriter, "Current ChannelInfo: %+v", current) @@ -1402,20 +1401,20 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { }, network.Orderers, peer, network) By("Removing channel from all orderers") - // TODO the channelparticipation.Remove does not clean up the etcdraft folder. This may prevent the + // TODO the nwo.Remove does not clean up the etcdraft folder. This may prevent the // correct re-creation of the channel on this orderer. // See: https://github.com/hyperledger/fabric/issues/3992 for _, o := range network.Orderers { ready := make(chan struct{}) go func() { defer GinkgoRecover() - channelparticipation.Remove(network, o, "testchannel") + nwo.Remove(network, o, "testchannel") close(ready) }() Eventually(ready, network.EventuallyTimeout).Should(BeClosed()) Eventually(func() int { // Removal is async - channelList := channelparticipation.List(network, o) + channelList := nwo.List(network, o) return len(channelList.Channels) }()).Should(BeZero()) } @@ -1442,7 +1441,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { } By("Re-adding the channel to the orderers") - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) FindLeader(ordererRunners) @@ -1450,7 +1449,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { "testchannel": 0, }, network.Orderers, peer, network) - expectedInfo := channelparticipation.ListOne(network, o1, "testchannel") + expectedInfo := nwo.ListOne(network, o1, "testchannel") By("Submitting tx") env := ordererclient.CreateBroadcastEnvelope(network, o2, "testchannel", []byte("foo")) @@ -1460,8 +1459,8 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { By("Waiting for the channel to stabilize") expectedInfo.Height++ - assertCatchup := func(expected channelparticipation.ChannelInfo) bool { - current := channelparticipation.ListOne(network, o1, "testchannel") + assertCatchup := func(expected nwo.ChannelInfo) bool { + current := nwo.ListOne(network, o1, "testchannel") ok := current == expected if !ok { fmt.Fprintf(GinkgoWriter, "Current ChannelInfo: %+v", current) @@ -1535,15 +1534,15 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { Eventually(ordererProcesses[0].Ready(), network.EventuallyTimeout).Should(BeClosed()) By("Ensuring the evicted orderer starts up with the channel as a follower") - expectedChannelInfo := channelparticipation.ChannelInfo{ + expectedChannelInfo := nwo.ChannelInfo{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", Status: "active", ConsensusRelation: "follower", Height: 2, } - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, o1, "testchannel") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, o1, "testchannel") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfo)) By("Adding the evicted orderer back to the application channel") @@ -1611,7 +1610,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { for i := range orderers[:3] { launch(i) } - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", orderers[:3]...) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", orderers[:3]...) leader := FindLeader(ordererRunners[:3]) @@ -1655,14 +1654,14 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { By(fmt.Sprintf("Launching orderer%d", i+1)) launch(i) - expectedInfo := channelparticipation.ChannelInfo{ + expectedInfo := nwo.ChannelInfo{ Name: "testchannel", URL: "/participation/v1/channels/testchannel", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, orderers[i], "testchannel", configBlock, expectedInfo) + nwo.Join(network, orderers[i], "testchannel", configBlock, expectedInfo) By(fmt.Sprintf("Checking that orderer%d has onboarded the network", i+1)) assertBlockReception(map[string]int{ @@ -1707,7 +1706,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { By("Launching the orderer that was never started from the genesis block") launch(3) - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", orderers[3]) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", orderers[3]) By("Launching orderer1") launch(0) @@ -1767,15 +1766,15 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { Eventually(ordererProc.Ready(), network.EventuallyTimeout).Should(BeClosed()) } - channelparticipation.JoinOrderersAppChannelCluster(network, "three-orderer-channel", o1, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, "three-orderer-channel", o1, o2, o3) FindLeader(ordererRunners) - channelparticipation.JoinOrderersAppChannelCluster(network, "single-orderer-channel", o1) + nwo.JoinOrderersAppChannelCluster(network, "single-orderer-channel", o1) FindLeader([]*ginkgomon.Runner{ordererRunners[0]}) - channelparticipation.ChannelListMatcher(channelparticipation.List(network, o1), + nwo.ChannelListMatcher(nwo.List(network, o1), []string{"single-orderer-channel", "three-orderer-channel"}) for _, o := range orderers[1:] { - channelparticipation.ChannelListMatcher(channelparticipation.List(network, o), + nwo.ChannelListMatcher(nwo.List(network, o), []string{"three-orderer-channel"}) } }) @@ -1801,7 +1800,7 @@ var _ = Describe("EndToEnd reconfiguration and onboarding", func() { } By("Creating the testchannel") - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3) By("Waiting for the testchannel to be ready") FindLeader(ordererRunners) diff --git a/integration/raft/migration_test.go b/integration/raft/migration_test.go index 91514e043c8..53efafb8e96 100644 --- a/integration/raft/migration_test.go +++ b/integration/raft/migration_test.go @@ -23,7 +23,6 @@ import ( "github.com/hyperledger/fabric/common/capabilities" "github.com/hyperledger/fabric/common/channelconfig" "github.com/hyperledger/fabric/common/policies" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" "github.com/hyperledger/fabric/integration/ordererclient" @@ -117,7 +116,7 @@ var _ = Describe("ConsensusTypeMigration", func() { runOrderers() - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3, o4) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3, o4) FindLeader([]*ginkgomon.Runner{o1Runner, o2Runner, o3Runner, o4Runner}) // === Step 2: Create a transaction with orderer1 === @@ -265,7 +264,7 @@ var _ = Describe("ConsensusTypeMigration", func() { runOrderers() - channelparticipation.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3, o4) + nwo.JoinOrderersAppChannelCluster(network, "testchannel", o1, o2, o3, o4) FindLeader([]*ginkgomon.Runner{o1Runner, o2Runner, o3Runner, o4Runner}) peer = network.Peer("Org1", "peer0") diff --git a/integration/sbe/sbe_test.go b/integration/sbe/sbe_test.go index ee28d5a7d5b..20aae861ea2 100644 --- a/integration/sbe/sbe_test.go +++ b/integration/sbe/sbe_test.go @@ -15,7 +15,6 @@ import ( docker "github.com/fsouza/go-dockerclient" "github.com/hyperledger/fabric-protos-go-apiv2/common" - "github.com/hyperledger/fabric/integration/channelparticipation" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" . "github.com/onsi/ginkgo/v2" @@ -95,7 +94,7 @@ var _ = Describe("SBE_E2E", func() { orderer := network.Orderer("orderer") By("setting up the channel") - channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) + nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner) network.VerifyMembership(network.PeersWithChannel("testchannel"), "testchannel") By("enabling 2.0 application capabilities") diff --git a/integration/smartbft/smartbft_test.go b/integration/smartbft/smartbft_test.go index adfae8e5894..c574639173a 100644 --- a/integration/smartbft/smartbft_test.go +++ b/integration/smartbft/smartbft_test.go @@ -29,7 +29,6 @@ import ( "github.com/hyperledger/fabric-config/configtx/orderer" "github.com/hyperledger/fabric-protos-go-apiv2/common" ordererProtos "github.com/hyperledger/fabric-protos-go-apiv2/orderer" - "github.com/hyperledger/fabric/integration/channelparticipation" conftx "github.com/hyperledger/fabric/integration/configtx" "github.com/hyperledger/fabric/integration/nwo" "github.com/hyperledger/fabric/integration/nwo/commands" @@ -209,7 +208,7 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { err = proto.Unmarshal(genesisBlockBytes, genesisBlock) Expect(err).NotTo(HaveOccurred()) - expectedChannelInfoPT := channelparticipation.ChannelInfo{ + expectedChannelInfoPT := nwo.ChannelInfo{ Name: "testchannel1", URL: "/participation/v1/channels/testchannel1", Status: "active", @@ -219,8 +218,8 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { for _, o := range network.Orderers { By("joining " + o.Name + " to channel as a consenter") - channelparticipation.Join(network, o, "testchannel1", genesisBlock, expectedChannelInfoPT) - channelInfo := channelparticipation.ListOne(network, o, "testchannel1") + nwo.Join(network, o, "testchannel1", genesisBlock, expectedChannelInfoPT) + channelInfo := nwo.ListOne(network, o, "testchannel1") Expect(channelInfo).To(Equal(expectedChannelInfoPT)) } @@ -316,24 +315,24 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { Expect(configBlock).NotTo(Equal(nil)) By("Joining " + orderer5.Name + " to channel as a consenter") - expectedChannelInfoPT = channelparticipation.ChannelInfo{ + expectedChannelInfoPT = nwo.ChannelInfo{ Name: "testchannel1", URL: "/participation/v1/channels/testchannel1", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, orderer5, "testchannel1", configBlock, expectedChannelInfoPT) + nwo.Join(network, orderer5, "testchannel1", configBlock, expectedChannelInfoPT) - expectedChannelInfoPT = channelparticipation.ChannelInfo{ + expectedChannelInfoPT = nwo.ChannelInfo{ Name: "testchannel1", URL: "/participation/v1/channels/testchannel1", Status: "active", ConsensusRelation: "consenter", Height: 8, } - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer5, "testchannel1") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer5, "testchannel1") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPT)) By("Waiting for the added orderer to see the leader") @@ -497,7 +496,7 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { err = proto.Unmarshal(genesisBlockBytes, genesisBlock) Expect(err).NotTo(HaveOccurred()) - expectedChannelInfoPT := channelparticipation.ChannelInfo{ + expectedChannelInfoPT := nwo.ChannelInfo{ Name: "testchannel1", URL: "/participation/v1/channels/testchannel1", Status: "active", @@ -507,8 +506,8 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { for _, o := range network.Orderers { By("joining " + o.Name + " to channel as a consenter") - channelparticipation.Join(network, o, "testchannel1", genesisBlock, expectedChannelInfoPT) - channelInfo := channelparticipation.ListOne(network, o, "testchannel1") + nwo.Join(network, o, "testchannel1", genesisBlock, expectedChannelInfoPT) + channelInfo := nwo.ListOne(network, o, "testchannel1") Expect(channelInfo).To(Equal(expectedChannelInfoPT)) } @@ -1004,7 +1003,7 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { err = proto.Unmarshal(genesisBlockBytes, genesisBlock) Expect(err).NotTo(HaveOccurred()) - expectedChannelInfoPT := channelparticipation.ChannelInfo{ + expectedChannelInfoPT := nwo.ChannelInfo{ Name: "testchannel1", URL: "/participation/v1/channels/testchannel1", Status: "active", @@ -1014,8 +1013,8 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { for _, o := range network.Orderers { By("joining " + o.Name + " to channel as a consenter") - channelparticipation.Join(network, o, "testchannel1", genesisBlock, expectedChannelInfoPT) - channelInfo := channelparticipation.ListOne(network, o, "testchannel1") + nwo.Join(network, o, "testchannel1", genesisBlock, expectedChannelInfoPT) + channelInfo := nwo.ListOne(network, o, "testchannel1") Expect(channelInfo).To(Equal(expectedChannelInfoPT)) } @@ -1091,24 +1090,24 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { Eventually(proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) By(">>>> joining " + newOrderer.Name + " to channel as a consenter") - expectedChannelInfoPT = channelparticipation.ChannelInfo{ + expectedChannelInfoPT = nwo.ChannelInfo{ Name: "testchannel1", URL: "/participation/v1/channels/testchannel1", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, newOrderer, "testchannel1", configBlock, expectedChannelInfoPT) + nwo.Join(network, newOrderer, "testchannel1", configBlock, expectedChannelInfoPT) - expectedChannelInfoPT = channelparticipation.ChannelInfo{ + expectedChannelInfoPT = nwo.ChannelInfo{ Name: "testchannel1", URL: "/participation/v1/channels/testchannel1", Status: "active", ConsensusRelation: "consenter", Height: uint64(2 + i), } - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, newOrderer, "testchannel1") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, newOrderer, "testchannel1") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfoPT)) By("Waiting for the added orderer to see the leader") @@ -1367,24 +1366,24 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { Eventually(proc.Ready(), network.EventuallyTimeout).Should(BeClosed()) By("joining " + orderer5.Name + " to channel as a consenter") - expectedChannelInfo := channelparticipation.ChannelInfo{ + expectedChannelInfo := nwo.ChannelInfo{ Name: "testchannel1", URL: "/participation/v1/channels/testchannel1", Status: "onboarding", ConsensusRelation: "consenter", Height: 0, } - channelparticipation.Join(network, orderer5, "testchannel1", configBlock, expectedChannelInfo) + nwo.Join(network, orderer5, "testchannel1", configBlock, expectedChannelInfo) - expectedChannelInfo = channelparticipation.ChannelInfo{ + expectedChannelInfo = nwo.ChannelInfo{ Name: "testchannel1", URL: "/participation/v1/channels/testchannel1", Status: "active", ConsensusRelation: "consenter", Height: 8, } - Eventually(func() channelparticipation.ChannelInfo { - return channelparticipation.ListOne(network, orderer5, "testchannel1") + Eventually(func() nwo.ChannelInfo { + return nwo.ListOne(network, orderer5, "testchannel1") }, network.EventuallyTimeout).Should(Equal(expectedChannelInfo)) By("Waiting for the added orderer to see the leader") @@ -2210,7 +2209,7 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { err = proto.Unmarshal(genesisBlockBytes, genesisBlock) Expect(err).NotTo(HaveOccurred()) - expectedChannelInfoPT := channelparticipation.ChannelInfo{ + expectedChannelInfoPT := nwo.ChannelInfo{ Name: cn, URL: "/participation/v1/channels/" + cn, Status: "active", @@ -2220,8 +2219,8 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { for _, o := range network.Orderers { By("joining " + o.Name + " to channel as a consenter") - channelparticipation.Join(network, o, cn, genesisBlock, expectedChannelInfoPT) - channelInfo := channelparticipation.ListOne(network, o, cn) + nwo.Join(network, o, cn, genesisBlock, expectedChannelInfoPT) + channelInfo := nwo.ListOne(network, o, cn) Expect(channelInfo).To(Equal(expectedChannelInfoPT)) } @@ -2237,13 +2236,13 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { ready := make(chan struct{}) go func() { defer GinkgoRecover() - channelparticipation.Remove(network, o, cn) + nwo.Remove(network, o, cn) close(ready) }() Eventually(ready, network.EventuallyTimeout).Should(BeClosed()) Eventually(func() int { // Removal is async - channelList := channelparticipation.List(network, o) + channelList := nwo.List(network, o) return len(channelList.Channels) }()).Should(BeZero()) } @@ -2265,7 +2264,7 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { err = proto.Unmarshal(genesisBlockBytes, genesisBlock) Expect(err).NotTo(HaveOccurred()) - expectedChannelInfoPT = channelparticipation.ChannelInfo{ + expectedChannelInfoPT = nwo.ChannelInfo{ Name: cn, URL: "/participation/v1/channels/" + cn, Status: "active", @@ -2275,8 +2274,8 @@ var _ = Describe("EndToEnd Smart BFT configuration test", func() { for _, o := range network.Orderers { By("joining " + o.Name + " to channel as a consenter again") - channelparticipation.Join(network, o, cn, genesisBlock, expectedChannelInfoPT) - channelInfo := channelparticipation.ListOne(network, o, cn) + nwo.Join(network, o, cn, genesisBlock, expectedChannelInfoPT) + channelInfo := nwo.ListOne(network, o, cn) Expect(channelInfo).To(Equal(expectedChannelInfoPT)) } @@ -2660,7 +2659,7 @@ func joinChannel(network *nwo.Network, channel string, onlyNodes ...int) { err = proto.Unmarshal(genesisBlockBytes, genesisBlock) Expect(err).NotTo(HaveOccurred()) - expectedChannelInfoPT := channelparticipation.ChannelInfo{ + expectedChannelInfoPT := nwo.ChannelInfo{ Name: channel, URL: "/participation/v1/channels/" + channel, Status: "active", @@ -2672,8 +2671,8 @@ func joinChannel(network *nwo.Network, channel string, onlyNodes ...int) { for _, i := range onlyNodes { o := network.Orderers[i] By("joining " + o.Name + " to channel as a consenter") - channelparticipation.Join(network, o, channel, genesisBlock, expectedChannelInfoPT) - channelInfo := channelparticipation.ListOne(network, o, channel) + nwo.Join(network, o, channel, genesisBlock, expectedChannelInfoPT) + channelInfo := nwo.ListOne(network, o, channel) Expect(channelInfo).To(Equal(expectedChannelInfoPT)) } @@ -2682,8 +2681,8 @@ func joinChannel(network *nwo.Network, channel string, onlyNodes ...int) { for _, o := range network.Orderers { By("joining " + o.Name + " to channel as a consenter") - channelparticipation.Join(network, o, channel, genesisBlock, expectedChannelInfoPT) - channelInfo := channelparticipation.ListOne(network, o, channel) + nwo.Join(network, o, channel, genesisBlock, expectedChannelInfoPT) + channelInfo := nwo.ListOne(network, o, channel) Expect(channelInfo).To(Equal(expectedChannelInfoPT)) } } diff --git a/orderer/consensus/cluster_status.go b/orderer/consensus/cluster_status.go index 84c043d5f6c..3b57ccfc2bc 100644 --- a/orderer/consensus/cluster_status.go +++ b/orderer/consensus/cluster_status.go @@ -10,14 +10,14 @@ import "github.com/hyperledger/fabric/orderer/common/types" // StatusReporter is implemented by cluster-type Chain implementations. // It allows the node to report its cluster relation and its status within that relation. -// This information is used to generate the channelparticipation.ChannelInfo in response +// This information is used to generate the nwo.ChannelInfo in response // to a "List" request on a particular channel. // // Not all chains must implement this, in particular non-cluster-type (e.g. inactive) are // assigned a StaticStatusReporter at construction time. type StatusReporter interface { // StatusReport provides the cluster relation and status. - // See: channelparticipation.ChannelInfo for more details. + // See: nwo.ChannelInfo for more details. StatusReport() (types.ConsensusRelation, types.Status) }