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

Avoid fetching internal transactions of blocks that still need refetching #2346

Merged
merged 2 commits into from
Jul 12, 2019

Conversation

pasqu4le
Copy link
Contributor

@pasqu4le pasqu4le commented Jul 11, 2019

Fixes: #2105

Motivation

Blocks that need refetching may have the wrong transactions, so if internal transactions for this block are fetched they can (in some cases) fail to be inserted because their transaction does not exist.
As a consequence this causes their insertion to fail multiple time before the block gets refetched.

Changelog

This PR excludes blocks that need refetching from internal transactions indexing.

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 Jul 11, 2019
@pasqu4le pasqu4le force-pushed the pp-avoid-internal-transactions-of-blocks-to-refetch branch from ea8cb60 to 5d68fce Compare July 11, 2019 11:31
@pasqu4le pasqu4le added the ready for review This PR is ready for reviews. label Jul 11, 2019
@coveralls
Copy link

coveralls commented Jul 11, 2019

Pull Request Test Coverage Report for Build bd487f5e-59d4-47ec-ab83-fa1a16a4f365

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 80.947%

Totals Coverage Status
Change from base Build 6827574a-53ef-42ca-8316-b2f2a3c93ab8: 0.02%
Covered Lines: 5196
Relevant Lines: 6419

💛 - Coveralls

Copy link
Contributor

@ayrat555 ayrat555 left a comment

Choose a reason for hiding this comment

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

adding regression test would be nice

vbaranov pushed a commit that referenced this pull request Jul 11, 2019
…hing

Problem: blocks that need refetching may have the wrong transactions, so if internal transactions for this block are fetched they can (in some cases) fail to be inserted because their transaction does not exist.
As a consequence this causes their insertion to fail multiple time before the block gets refetched.

Solution: exclude blocks that need refetching from internal transactions indexing.
@pasqu4le pasqu4le force-pushed the pp-avoid-internal-transactions-of-blocks-to-refetch branch from 5d68fce to c38aea8 Compare July 11, 2019 14:19
@pasqu4le
Copy link
Contributor Author

@ayrat555 right! I added it as a doctest.

@vbaranov vbaranov merged commit b285218 into master Jul 12, 2019
@vbaranov vbaranov deleted the pp-avoid-internal-transactions-of-blocks-to-refetch branch July 12, 2019 09:13
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.

Internal transactions fetcher stops indexing after some time
5 participants