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 the block last finalized pointer returned by GetBlockInfo. #1003

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

td202
Copy link
Contributor

@td202 td202 commented Aug 17, 2023

Purpose

Fixes #1002.

Changes

  • Change the implementation of lastFinalizedOf to correctly get an ancestor of a block that is considered finalized when examining the chain just to the given block. In particular, this requires two blocks to be in the same epoch, as well as in consecutive rounds.
  • Change the implementation of getBlockInfo to always use the result provided by lastFinalizedOf, instead of using the block itself when it is finalized.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@td202 td202 merged commit bf46ad3 into main Aug 18, 2023
3 checks passed
@td202 td202 deleted the block-last-finalized branch August 18, 2023 12: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.

Fix last finalized block pointer for consensus version 1
3 participants