Skip to content
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

[I-02] Commented Out Code in 'certified' Function #295

Open
softstackio opened this issue Jan 13, 2025 · 0 comments · May be fixed by #297
Open

[I-02] Commented Out Code in 'certified' Function #295

softstackio opened this issue Jan 13, 2025 · 0 comments · May be fixed by #297
Assignees

Comments

@softstackio
Copy link

Likelihood: Low

Description
In the 'certified' function of the CertifierHbbft contract, there is a commented out section that references a 'stakingContract'. This commented code suggests an incomplete or planned functionality related to the staking contract. The presence of commented code in a production contract can lead to confusion about the intended behaviour and may indicate unfinished or abandoned features.

The commented section is as follows:

// IStakingHbbft stakingContract = IStakingHbbft(
//     validatorSetContract.getStakingContract()
// );

Recommendation:

  1. Review the purpose of the commented code and determine if it's needed for future functionality.
  2. If the code is no longer relevant, remove it entirely to improve code clarity.
  3. If the functionality is intended for future use, consider adding a TODO comment
    explaining the plan for this code.
  4. If the functionality should be implemented, uncomment the code, complete the
    implementation, and thoroughly test it.
  5. Ensure all code in production contracts is active and serves a purpose to avoid
    confusion and potential security risks.
@axel-muller axel-muller self-assigned this Jan 21, 2025
@axel-muller axel-muller linked a pull request Jan 23, 2025 that will close this issue
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 a pull request may close this issue.

2 participants