From 7818a248aea51e529573e51966526d045728385c 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 9ff671d4541..5130f23d45d 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) + suite.Require().NoError(path.EndpointA.ChanOpenInit()) + for _, tc := range testCases { tc := tc suite.Run(tc.name, func() {