-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add solomachine and tm light client registrations #325
Conversation
WalkthroughThe changes in this pull request primarily involve the integration of new modules into the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
app/app.go
(2 hunks)
🔇 Additional comments (1)
app/app.go (1)
104-105
: LGTM: New light client modules imported correctly
The solomachine
and ibctm
modules are imported appropriately.
ibctm.AppModuleBasic{}, | ||
solomachine.AppModuleBasic{}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Ensure full integration of new light client modules
While the ibctm.AppModuleBasic{}
and solomachine.AppModuleBasic{}
are added to ModuleBasics
, to fully integrate these modules into the application, they should also be registered in the module manager and included in the application's lifecycle methods.
Add modules to the module manager initialization
Include the new modules in the module.NewManager
:
app.mm = module.NewManager(
genutil.NewAppModule(
app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx,
encodingConfig.TxConfig,
),
auth.NewAppModule(appCodec, app.AccountKeeper, nil, app.GetSubspace(authtypes.ModuleName)),
// ... existing modules
+ ibctm.NewAppModule(app.IBCKeeper.ClientKeeper),
+ solomachine.NewAppModule(),
// ... remaining modules
)
Register modules in application lifecycle methods
Add the modules to SetOrderBeginBlockers
, SetOrderEndBlockers
, and SetOrderInitGenesis
to ensure they participate in the application lifecycle:
app.mm.SetOrderBeginBlockers(
upgradetypes.ModuleName,
capabilitytypes.ModuleName,
// ... existing modules
+ ibctm.ModuleName,
+ solomachine.ModuleName,
// ... remaining modules
)
app.mm.SetOrderEndBlockers(
crisistypes.ModuleName,
govtypes.ModuleName,
// ... existing modules
+ ibctm.ModuleName,
+ solomachine.ModuleName,
// ... remaining modules
)
app.mm.SetOrderInitGenesis(
capabilitytypes.ModuleName,
authtypes.ModuleName,
// ... existing modules
+ ibctm.ModuleName,
+ solomachine.ModuleName,
// ... remaining modules
)
Committable suggestion skipped: line range outside the PR's diff.
Summary by CodeRabbit