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

Don't Copy The Whole Validator Map each time #5780

Merged
merged 2 commits into from
May 8, 2020
Merged

Don't Copy The Whole Validator Map each time #5780

merged 2 commits into from
May 8, 2020

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented May 8, 2020

What type of PR is this?

Code Cleanup

What does this PR do? Why is it needed?

Refactor to only append validators and internally add pubkeys to our validator index map. This makes each map track the validator field as its 'reference'. We only copy the whole map once per deposit, so as to reduce the time spent of map copies.

Which issues(s) does this PR fix?
Part of #5779

Other notes for review

@codecov
Copy link

codecov bot commented May 8, 2020

Codecov Report

Merging #5780 into master will decrease coverage by 0.73%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5780      +/-   ##
==========================================
- Coverage   57.97%   57.24%   -0.74%     
==========================================
  Files         312      312              
  Lines       26506    26155     -351     
==========================================
- Hits        15368    14973     -395     
- Misses       9033     9084      +51     
+ Partials     2105     2098       -7     

@nisdas nisdas marked this pull request as ready for review May 8, 2020 07:45
@nisdas nisdas requested a review from a team as a code owner May 8, 2020 07:45
@nisdas nisdas added the Ready For Review A pull request ready for code review label May 8, 2020
Copy link
Contributor

@farazdagi farazdagi left a comment

Choose a reason for hiding this comment

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

lgtm

@nisdas nisdas merged commit 6fed51d into master May 8, 2020
@delete-merged-branch delete-merged-branch bot deleted the fixMapCopy branch May 8, 2020 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants