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

Code refactor and fixes needed #88

Open
AdityaInnovates opened this issue Jan 9, 2025 · 0 comments
Open

Code refactor and fixes needed #88

AdityaInnovates opened this issue Jan 9, 2025 · 0 comments

Comments

@AdityaInnovates
Copy link

AdityaInnovates commented Jan 9, 2025

Incorrect Modifier Logic (electionStarted)
Issue: The electionStarted modifier aims to confirm that the election has begun, but its logic is flawed at
Code: Open code in github:

if (block.timestamp > electionInfo.startTime) revert ElectionInactive();

Correction: This should verify if the current time is prior to the start time.

Additionally, we can remove the Unused Candidate ID (Candidate Struct) at:
Code: Open code in github:

uint candidateID; // remove candidateId its not needed
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

No branches or pull requests

1 participant