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

Handle nil size in block decoding routine #1829

Merged
merged 2 commits into from
Apr 24, 2019

Conversation

goodsoft
Copy link
Contributor

@goodsoft goodsoft commented Apr 24, 2019

Uncle blocks fetched using eth_getUncleByBlockHashAndIndex API may have null in their size field.
We shouldn't crash in this case.

Checklist for your PR

  • I added an entry to CHANGELOG.md with this PR
  • If I added new functionality, I added tests covering it.
  • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • I checked whether I should update the docs and did so if necessary

Uncle block fetched using eth_getUncleByBlockHashAndIndex API may have
null in their size field. We shouldn't crash in this case.
@ghost ghost assigned goodsoft Apr 24, 2019
@ghost ghost added the in progress label Apr 24, 2019
@goodsoft goodsoft changed the title Handle nil quantities in block decoding routine Handle nil size in block decoding routine Apr 24, 2019
@goodsoft goodsoft added ready for review This PR is ready for reviews. and removed in progress labels Apr 24, 2019
@coveralls
Copy link

Pull Request Test Coverage Report for Build 09e5715d-5c84-424c-a278-732ea58f0b07

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 6 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.1%) to 82.193%

Files with Coverage Reduction New Missed Lines %
apps/indexer/lib/indexer/fetcher/token.ex 1 78.57%
apps/indexer/lib/indexer/fetcher/token_balance.ex 2 87.1%
apps/indexer/lib/indexer/block/fetcher.ex 3 86.36%
Totals Coverage Status
Change from base Build 0241c27b-6aa4-461d-8ced-89f271eae2d4: -0.1%
Covered Lines: 4445
Relevant Lines: 5408

💛 - Coveralls

@vbaranov vbaranov merged commit 63fe28b into master Apr 24, 2019
@vbaranov vbaranov deleted the goodsoft/gs-fix-uncle-block-size branch April 24, 2019 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR is ready for reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants