From e87f4507bd66bf7a255573fe8f5ec09d3316d2d3 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Tue, 11 Jul 2023 21:29:11 +0300 Subject: [PATCH] Force distinct channel identifiers when testing UpgradeOpen. --- modules/core/04-channel/keeper/upgrade_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/core/04-channel/keeper/upgrade_test.go b/modules/core/04-channel/keeper/upgrade_test.go index 9ff671d4541f..f1f3095ae8cb 100644 --- a/modules/core/04-channel/keeper/upgrade_test.go +++ b/modules/core/04-channel/keeper/upgrade_test.go @@ -707,6 +707,14 @@ func (suite *KeeperTestSuite) TestChanUpgradeOpen() { }, } + // Create an initial path used only to invoke a ChanOpenInit handshake. + // This bumps the channel identifier generated for chain A on the + // next path used to run the upgrade handshake. + // See issue 4062. + path = ibctesting.NewPath(suite.chainA, suite.chainB) + suite.coordinator.SetupConnections(path) + path.EndpointA.ChanOpenInit() + for _, tc := range testCases { tc := tc suite.Run(tc.name, func() {