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

remove rewards from getminedblocks rpc response #2613

Merged
merged 7 commits into from
Aug 26, 2019
Merged

Conversation

ayrat555
Copy link
Contributor

fixes #2493

Reward calculation is a heavy operation since it joins
rewards and transactions tables with blocks.
transactions is one of the largest tables in the DB.

So that was a reason for a request timeout. Removing rewards
fixed the issue. From this point rewards should be fetched
with getblockreward rpc.

Pagination is already implemented.

Changelog

  • remove rewards from getminedblocks rpc response

Reward calculation is a heavy operation since it joins
`rewards` and `transactions` tables with `blocks`.
`transactions` is one of the largest tables in the DB.

So that was a reason for a request timeout. Removing rewards
fixed the issue. From this point rewards should be fetched
with `getblockreward` rpc.
Copy link
Member

@vbaranov vbaranov left a comment

Choose a reason for hiding this comment

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

Removing of rewards from this endpoint makes sense in order to speed up its loading

@coveralls
Copy link

coveralls commented Aug 24, 2019

Pull Request Test Coverage Report for Build 5486ed8f-4eeb-45fc-b5ec-e5297e35e57b

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+2.7%) to 78.944%

Totals Coverage Status
Change from base Build 9c178d1d-8d48-44d4-901d-0af8078daccc: 2.7%
Covered Lines: 5189
Relevant Lines: 6573

💛 - Coveralls

@ayrat555 ayrat555 merged commit 0c6bd68 into master Aug 26, 2019
@ayrat555 ayrat555 deleted the ab-fix-getminedblocks branch August 26, 2019 11:39
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.

getminedblocks API endpoint doesn't work
5 participants