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

perf(dapi): use cached core height in streaming endpoints #1865

Merged
merged 2 commits into from
May 29, 2024

Conversation

shumkov
Copy link
Member

@shumkov shumkov commented May 29, 2024

Issue being fixed or feature implemented

In order to reduce amount of Core RPC calls (which is slow), we should use already available chain height.

What was done?

  • Use height from ChainDataProvider instead of calling getBestBlockHeight every request in subscribeToTransactionsWithProofs and subscribeToBlockHeadersWithChainLocks

How Has This Been Tested?

Updated tests

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shumkov shumkov requested a review from QuantumExplorer as a code owner May 29, 2024 12:07
@shumkov shumkov added this to the v1.0.0 milestone May 29, 2024
@shumkov shumkov merged commit 710d0ef into v1.0-dev May 29, 2024
19 checks passed
@shumkov shumkov deleted the perf/use-cached-chain-height branch May 29, 2024 17:15
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