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

fix(block_sync): check that next block has height +1 #5111

Merged

Conversation

Erigara
Copy link
Contributor

@Erigara Erigara commented Sep 30, 2024

Context

Closes #5072.

After more than 2 blocks was shared through block stream this problem appeared.

Solution

Bug was that code checked that blocks[i].height -1 == blocks[i + 1].height, when should be blcoks[i].height + 1 == blocks[i + 1].height.

Tests were added to check this validation.

@Erigara Erigara added the Bug Something isn't working label Sep 30, 2024
@Erigara Erigara self-assigned this Sep 30, 2024
@mversic mversic merged commit a9ea21a into hyperledger-iroha:main Oct 1, 2024
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] [perf] Synchronization of blocks out of their sequential order.
3 participants