Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add ValidatorWeightDiff Add and Sub helpers #3514

Merged
merged 3 commits into from
Nov 3, 2024
Merged

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

Currently Add(true/false, amount) is pretty clunky to use. It was implemented this way to avoid duplicate code in the implementation, but adds needless complexity during the usage.

How this works

This PR un-exports the current Add(bool, uint64) function and replaces it with Add(uint64) and Sub(uint64).

How this was tested

Updated existing tests.

Need to be documented in RELEASES.md?

No user facing changes.

@StephenButtolph StephenButtolph added the cleanup Code quality improvement label Nov 1, 2024
@StephenButtolph StephenButtolph added this to the v1.11.13 milestone Nov 1, 2024
@StephenButtolph StephenButtolph self-assigned this Nov 1, 2024
vms/platformvm/state/state.go Outdated Show resolved Hide resolved
@marun marun added this pull request to the merge queue Nov 3, 2024
Merged via the queue into master with commit 9e9d658 Nov 3, 2024
23 checks passed
@marun marun deleted the add-weight-diff-helpers branch November 3, 2024 16:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
cleanup Code quality improvement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants