Skip to content

fix: Prevent Recursive Call in Update module.go #4778

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

moshderte
Copy link

Summary
This PR fixes a recursive call bug in the RegisterInterfaces method of the AppModuleBasic struct.

What was the issue?
Previously, the method was defined as: func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
RegisterInterfaces(registry)
This leads to an infinite recursive call, as the method was calling itself instead of the intended package-level RegisterInterfaces function. This results in a stack overflow panic at runtime.

What was changed?
Renamed the package-level RegisterInterfaces function to RegisterCometBLSInterfaces and updated the method accordingly: func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
RegisterCometBLSInterfaces(registry)

Why is this important?
Prevents runtime panic due to infinite recursion

Makes the code more maintainable and less prone to name shadowing errors

Summary
This PR fixes a recursive call bug in the RegisterInterfaces method of the AppModuleBasic struct.

What was the issue?
Previously, the method was defined as: func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
    RegisterInterfaces(registry)
This leads to an infinite recursive call, as the method was calling itself instead of the intended package-level RegisterInterfaces function. This results in a stack overflow panic at runtime.

What was changed?
Renamed the package-level RegisterInterfaces function to RegisterCometBLSInterfaces and updated the method accordingly: func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
    RegisterCometBLSInterfaces(registry)

Why is this important?
Prevents runtime panic due to infinite recursion

Makes the code more maintainable and less prone to name shadowing errors
Copy link

vercel bot commented Jul 5, 2025

@moshderte is attempting to deploy a commit to the unionbuild Team on Vercel.

A member of the Team first needs to authorize it.

@onyedika12
Copy link

Fixed

@moshderte
Copy link
Author

@aeryz check please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants