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

Return err instead of 0 for unavailable participation #5934

Merged
merged 2 commits into from May 20, 2020
Merged

Conversation

terencechain
Copy link
Member

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?
If the participation info of an epoch is not yet available (ie due to skip blocks, node processes epoch based on new block, not based on time), the node should return an unavailable error, instead of return new struct with all fields initialized to 0s. This has been confusing to many users, they often asked, why my node reported 0 stake was participated.

@terencechain terencechain added the Ready For Review A pull request ready for code review label May 20, 2020
@terencechain terencechain requested a review from a team as a code owner May 20, 2020 21:47
@terencechain terencechain self-assigned this May 20, 2020
@codecov
Copy link

codecov bot commented May 20, 2020

Codecov Report

Merging #5934 into master will decrease coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5934      +/-   ##
==========================================
- Coverage   59.47%   59.40%   -0.08%     
==========================================
  Files         318      318              
  Lines       26796    26796              
==========================================
- Hits        15938    15917      -21     
- Misses       8696     8720      +24     
+ Partials     2162     2159       -3     

@0xKiwi 0xKiwi merged commit 52988a0 into master May 20, 2020
@delete-merged-branch delete-merged-branch bot deleted the participation-err branch May 20, 2020 22:47
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.

None yet

2 participants