Skip to content

chore: add safety guard for negative cycle index#6527

Open
operagxsasha wants to merge 1 commit intotronprotocol:developfrom
operagxsasha:patch-3
Open

chore: add safety guard for negative cycle index#6527
operagxsasha wants to merge 1 commit intotronprotocol:developfrom
operagxsasha:patch-3

Conversation

@operagxsasha
Copy link
Contributor

What does this PR do?

Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

}
if (beginCycle < endCycle) {
for (Pair<byte[], Long> vote : srAddresses) {
if (beginCycle == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Image beginCycle will be start with 1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, this prevents beginCycle from being 0

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