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

refactor: blocksync.bpRequester should stop procedure if block was received #546

Merged
merged 5 commits into from
Jan 3, 2023

Conversation

shotonoff
Copy link
Collaborator

@shotonoff shotonoff commented Dec 29, 2022

Issue being fixed or feature implemented

Even if during block sync operation a block was received then a routine still waits until a context will cancel

What was done?

  • Exit from bpRequester.requestRoutine if a block is received
  • simplify logic bpRequester.requestRoutine

How Has This Been Tested?

Unit/E2E tests

Breaking Changes

N/A

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 made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shotonoff shotonoff force-pushed the refactor-blocksync-block-peer-requester branch from b96a067 to 841ec00 Compare December 29, 2022 14:45
internal/blocksync/pool.go Outdated Show resolved Hide resolved
internal/blocksync/pool.go Outdated Show resolved Hide resolved
lklimek
lklimek previously approved these changes Jan 2, 2023
shotonoff and others added 2 commits January 3, 2023 10:42
Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>
@shotonoff shotonoff requested a review from lklimek January 3, 2023 10:12
Copy link
Collaborator Author

@shotonoff shotonoff left a comment

Choose a reason for hiding this comment

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

please review PR again after the applied changes

@shotonoff shotonoff merged commit 6848c91 into v0.10-dev Jan 3, 2023
@shotonoff shotonoff deleted the refactor-blocksync-block-peer-requester branch January 3, 2023 11:18
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