-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(connection): migrate connection params (#3650)
* feat(connection): migrate connection params * Rename messages to match other modules. * Update proto/ibc/core/connection/v1/tx.proto Co-authored-by: Damian Nolan <[email protected]> * Address review comments. * Use define const for default delay. * Update modules/core/keeper/msg_server.go Co-authored-by: Damian Nolan <[email protected]> * Regenerate tx files. * fixed typo * rename test * Rebase, regenerate. * remove redundant param validation in initgenesis. --------- Co-authored-by: Damian Nolan <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]>
- Loading branch information
1 parent
d751bc9
commit 96808eb
Showing
23 changed files
with
813 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package keeper_test | ||
|
||
import ( | ||
"github.com/cosmos/ibc-go/v7/modules/core/03-connection/keeper" | ||
"github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" | ||
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" | ||
) | ||
|
||
// TestMigrateParams tests that the params for the connection are properly migrated | ||
func (suite *KeeperTestSuite) TestMigrateParams() { | ||
testCases := []struct { | ||
name string | ||
malleate func() | ||
expectedParams types.Params | ||
}{ | ||
{ | ||
"success: default params", | ||
func() { | ||
params := types.DefaultParams() | ||
subspace := suite.chainA.GetSimApp().GetSubspace(ibcexported.ModuleName) | ||
subspace.SetParamSet(suite.chainA.GetContext(), ¶ms) // set params | ||
}, | ||
types.DefaultParams(), | ||
}, | ||
} | ||
|
||
for _, tc := range testCases { | ||
tc := tc | ||
suite.Run(tc.name, func() { | ||
suite.SetupTest() // reset | ||
|
||
tc.malleate() | ||
|
||
ctx := suite.chainA.GetContext() | ||
migrator := keeper.NewMigrator(suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper) | ||
err := migrator.MigrateParams(ctx) | ||
suite.Require().NoError(err) | ||
|
||
params := suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper.GetParams(ctx) | ||
suite.Require().Equal(tc.expectedParams, params) | ||
}) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.