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

Implement new initiate validator exit function #2366

Merged
merged 11 commits into from
Apr 26, 2019

Conversation

terencechain
Copy link
Member

Part of #2307

Updated:

  • Implemented InitiateValidatorExit
  • Replaced old InitiateValidatorExit
  • Fixed existing tests and added tests for InitiateValidatorExit

@codecov
Copy link

codecov bot commented Apr 24, 2019

Codecov Report

Merging #2366 into spec-v0.6 will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           spec-v0.6    #2366   +/-   ##
==========================================
  Coverage      68.71%   68.71%           
==========================================
  Files            119      119           
  Lines           9413     9413           
==========================================
  Hits            6468     6468           
  Misses          2262     2262           
  Partials         683      683

@terencechain terencechain changed the title Implement new initiate exit function Implement new initiate validator exit function Apr 24, 2019
return state
}

// Aggregate all the exit epochs from the last.
Copy link
Member

Choose a reason for hiding this comment

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

From the last what?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

}

// Aggregate all the exit epochs from the last.
var exitedEpochs []uint64
Copy link
Member

Choose a reason for hiding this comment

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

It looks like you are looking only for the highest epoch, no need to store all of them in an array and iterate over them to find the highest epoch.

Copy link
Member Author

Choose a reason for hiding this comment

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

great feedback, this simplified it by a lot

@terencechain terencechain merged commit 4a71a37 into spec-v0.6 Apr 26, 2019
@terencechain terencechain deleted the validator-helpers-3 branch June 6, 2019 14:09
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.

3 participants