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

fix: remove isValue as it is not needed #260

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

0xCardinalError
Copy link
Contributor

We are using isValue in struct as a check if there is some value in struct, but it's obsolete, as solidity, has default values for values that are not set, so we can use "lastUpdatedBlockNumber" check to see if it is zero, as it will be zero just when staking is not ever added, the first time it is, it will have value and will always have some value in future, which is what we wanted with isValue in first place.

@0xCardinalError 0xCardinalError changed the title fix: rempove isValue as it is not needed fix: remove isValue as it is not needed May 27, 2024
Copy link
Member

@nugaon nugaon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add comment to lastUpdatedBlockNumber is used for dirty flag as well

@0xCardinalError 0xCardinalError changed the base branch from new_staking to new_staking_swip20 July 16, 2024 13:14
@0xCardinalError 0xCardinalError merged commit 228946c into new_staking_swip20 Aug 26, 2024
1 check passed
@0xCardinalError 0xCardinalError deleted the remove_isValue branch August 26, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants