Skip to content

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

Open
moshderte wants to merge 1 commit intounionlabs:mainfrom
moshderte:patch-1
Open

fix: Prevent Recursive Call in Update module.go#4778
moshderte wants to merge 1 commit intounionlabs:mainfrom
moshderte:patch-1

Conversation

@moshderte
Copy link
Copy Markdown

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
@vercel
Copy link
Copy Markdown

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
Copy Markdown

Fixed

@moshderte
Copy link
Copy Markdown
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