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

feat(sync orphan_block_pool): cleanup expired blocks in orphan block #2989

Merged
merged 1 commit into from
Sep 14, 2021
Merged

feat(sync orphan_block_pool): cleanup expired blocks in orphan block #2989

merged 1 commit into from
Sep 14, 2021

Conversation

chanhsu001
Copy link
Contributor

What problem does this PR solve?

cleanup expired blocks in orphan pool periodically, avoid memory leak when long run

Problem Summary:

What is changed and how it works?

periodically cleanup in sync module, and in cleanup procedure, check if blocks with epoch less than
chain tip epcho 6 epochs, remove these blocks and also remove items in header view.

What's Changed:

Related changes

  • PR to update owner/repo:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Release note

Title Only: Include only the PR title in the release note.

@chanhsu001 chanhsu001 requested a review from driftluo August 31, 2021 07:19
@chanhsu001 chanhsu001 requested a review from a team as a code owner August 31, 2021 07:20
@chanhsu001 chanhsu001 requested a review from doitian August 31, 2021 07:20
sync/src/orphan_block_pool.rs Outdated Show resolved Hide resolved
sync/src/orphan_block_pool.rs Outdated Show resolved Hide resolved
sync/src/orphan_block_pool.rs Outdated Show resolved Hide resolved
sync/src/types/mod.rs Outdated Show resolved Hide resolved
sync/src/types/mod.rs Outdated Show resolved Hide resolved
sync/src/orphan_block_pool.rs Outdated Show resolved Hide resolved
@chanhsu001
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Sep 14, 2021

Build succeeded:

@bors bors bot merged commit a3395fe into nervosnetwork:develop Sep 14, 2021
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.

3 participants