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

chain: Avoid early getHeaders on sidechains #2315

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

matheusd
Copy link
Member

This adds a check for the presence of the parent block on a known sidechain prior to re-requesting all headers on announced blocks during RPC chain sync

Prior to this commit, the parent block was checked for presence only on the main chain, which could cause getHeaders to be repeatedly executed on reorgs of size greater than one.

This was mostly an issue for automated tests that generate large reorgs.

This adds a check for the presence of the parent block on a known
sidechain prior to re-requesting all headers on announced blocks during
RPC chain sync

Prior to this commit, the parent block was checked for presence only on
the main chain, which could cause getHeaders to be repeatedly executed
on reorgs of size greater than one.

This was mostly an issue for automated tests that generate large reorgs.
@jrick jrick merged commit 705569f into decred:master Dec 12, 2023
2 checks passed
@matheusd matheusd deleted the chain-sync-reorg branch December 12, 2023 16:37
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