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

Fetch balance only for blocks which are greater or equal block with FIRST_BLOCK number #3126

Merged
merged 1 commit into from
May 26, 2020

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented May 26, 2020

Motivation

Eliminate requests to the node for blocks which state doesn't exist on the node. Example of response from such failed request from Nethermind archive node:

0x58bad7cf29428c3d17cb859f5c580d3c25f134cd@�: (-32002) No state available for block 0x56c39d10e519eda9e8c0175c2f9d0c25ec41c18ddd870febcf6e05d5410327a7

Changelog

Take into consideration FIRST_BLOCK environment variable in getting coin balances for the address at the block. Specifically, make a request only if the block number is greater or equal to the FIRST_BLOCK param.

Checklist for your Pull Request (PR)

@vbaranov vbaranov force-pushed the vb-fetch-balances-with-first-block branch from 5830175 to 4f591a5 Compare May 26, 2020 11:48
@coveralls
Copy link

coveralls commented May 26, 2020

Pull Request Test Coverage Report for Build 02310b9a-cf34-4538-8161-4afdcb95d551

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.02%) to 75.079%

Files with Coverage Reduction New Missed Lines %
apps/block_scout_web/lib/block_scout_web/controllers/chain/market_history_chart_controller.ex 2 71.43%
apps/explorer/lib/explorer/chain_spec/genesis_data.ex 5 9.09%
Totals Coverage Status
Change from base Build 3a7e398e-110e-49f3-8c1e-5b616d77a0be: 0.02%
Covered Lines: 5712
Relevant Lines: 7608

💛 - Coveralls

@vbaranov vbaranov self-assigned this May 26, 2020
@vbaranov vbaranov merged commit ed2105d into master May 26, 2020
@vbaranov vbaranov deleted the vb-fetch-balances-with-first-block branch May 26, 2020 13:24
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.

None yet

2 participants