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

Fix BlocksTransactionsMismatch temporary fetcher #2027

Merged
merged 3 commits into from May 29, 2019

Conversation

pasqu4le
Copy link
Contributor

@pasqu4le pasqu4le commented May 25, 2019

Bug Fixes

This solves a problem that was found with BlocksTransactionsMismatch temporary fetcher:
block with no transactions were not taken into account, so they were not checked and never had their refetch_needed field set to false.

Additionally, a consensus filtering has been added to the AddRefetchNeededToBlock migration to save some unnecessary update in it and some checks from the temporary fetcher.

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

@pasqu4le pasqu4le self-assigned this May 25, 2019
This solves a problem that was found with this fetcher:
block with no transactions were not taken into account, so they were not checked and never had their `refetch_needed` field set to false.
@pasqu4le pasqu4le force-pushed the fix-block-transaction-mismatch-fetcher branch from befda9e to 1bd2dcd Compare May 25, 2019 15:58
@pasqu4le pasqu4le added the ready for review This PR is ready for reviews. label May 25, 2019
@coveralls
Copy link

coveralls commented May 25, 2019

Pull Request Test Coverage Report for Build 82e98b46-04c1-4142-98c6-85fe40679b17

  • 0 of 3 (0.0%) changed or added relevant lines in 1 file are covered.
  • 11 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.2%) to 81.037%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
apps/indexer/lib/indexer/temporary/blocks_transactions_mismatch.ex 1 0.0%
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 87.84%
apps/indexer/lib/indexer/block/catchup/fetcher.ex 4 69.23%
Totals Coverage Status
Change from base Build ae1c527a-460d-4beb-a514-abe8b88d1fe8: -0.2%
Covered Lines: 4718
Relevant Lines: 5822

💛 - Coveralls

It is unnecessary to set `refetch_needed` to blocks that do not yet have a consensus, so this small change can save some time in the migration and avoid some checking from the temporary fetcher.
vbaranov pushed a commit that referenced this pull request May 28, 2019
@vbaranov vbaranov merged commit 8296446 into master May 29, 2019
@vbaranov vbaranov deleted the fix-block-transaction-mismatch-fetcher branch May 29, 2019 13:39
This was referenced Jun 4, 2019
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.

None yet

6 participants