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

Rewrite missing blocks range query #3440

Merged
merged 2 commits into from
Nov 12, 2020

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Nov 9, 2020

Motivation

Function to find missing blocks ranges in given range misses some ranges.

For instance, current implementation of missing_block_number_ranges function returns empty range for this range Explorer.Chain.missing_block_number_ranges(12859384..12859386) even though _4 is not consensus block, _5 is missing.

dai=# select consensus, number from blocks where number in (12859383, 12859384, 12859385, 12859386);
 consensus |  number
-----------+----------
 t         | 12859383
 f         | 12859384
 t         | 12859386
(3 rows)

Changelog

Fully rewrite the query and add tests which don't work with the previous algorithm.

Checklist for your Pull Request (PR)

@vbaranov vbaranov force-pushed the vb-rewrite-missing-blocks-range-query branch from cb63255 to 0fcecb6 Compare November 9, 2020 15:13
@coveralls
Copy link

coveralls commented Nov 9, 2020

Pull Request Test Coverage Report for Build b8e184f8389b14b2dceba9033d6eeff48ff9fda9-PR-3440

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.08%) to 67.433%

Totals Coverage Status
Change from base Build f3e4e0081c2f67a2f3f51fb0803476364aaf15e8: -0.08%
Covered Lines: 2054
Relevant Lines: 3046

💛 - Coveralls

@vbaranov vbaranov force-pushed the vb-rewrite-missing-blocks-range-query branch 2 times, most recently from ddae057 to 81d8124 Compare November 9, 2020 16:19
@vbaranov vbaranov force-pushed the vb-rewrite-missing-blocks-range-query branch from 4dc406c to b8e184f Compare November 12, 2020 07:09
@vbaranov vbaranov merged commit d79427c into master Nov 12, 2020
@vbaranov vbaranov deleted the vb-rewrite-missing-blocks-range-query branch November 12, 2020 07:10
@SwaroopH SwaroopH mentioned this pull request Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants