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

[ValidatorSet] Handling 0-length of memory array #197

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

nxqbao
Copy link
Contributor

@nxqbao nxqbao commented Mar 10, 2023

Description

Previous code does not handle updating size of revoked candidates array, which causes false emission of event CreditScoreUpdated(address(0)).

Contract changes

The table below shows the following info:

  • Logic: the logic is changed.
  • ABI: the ABI is changed.
  • Init data: new storage field is declared and needs initializing.
  • Dependent: needs to be changed due to changes in other contracts.
Contract name Logic ABI Init data Dependent
BridgeTracking
GovernanceAdmin
Maintenance
SlashIndicator
Staking
StakingVesting
ValidatorSet [x]

Checklist

  • I have clearly commented on all the main functions following the NatSpec Format
  • The box that allows repo maintainers to update this PR is checked
  • I tested locally to make sure this feature/fix works

@nxqbao nxqbao changed the title fix updating 0 length array [ValidatorSet] Handling 0-length of memory array Mar 10, 2023
@nxqbao nxqbao merged commit d3ea624 into dev Mar 10, 2023
@nxqbao nxqbao deleted the fix/improper-handling-0-size-memory-array branch March 10, 2023 07:45
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