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

Add invalidate block method and invalidated_blocks field to NonFinalizedState #9167

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

elijahhampton
Copy link
Contributor

Motivation

This PR implements a new method invalidate_block to invalidate a block based on the block::Hash along with the blocks descendants. This PR closes the following issue: #8840 , #8841

Specifications & References

Reference: #8634

Solution

  • Adds invalidate_block method to NonFinalizedState
  • Changes visibility to pub(crate) for UpdateWith / RevertPosition in chain.rs
  • Adds test for invalidate_block in vectors.rs
  • Adds new invalidated_blocks state to NonFinalizedState

Tests

Follow-up Work

PR Author's Checklist

  • The PR name will make sense to users.
  • The PR provides a CHANGELOG summary.
  • The solution is tested.
  • The documentation is up to date.
  • The PR has a priority label.

PR Reviewer's Checklist

  • The PR Author's checklist is complete.
  • The PR resolves the issue.

Elijah Hampton added 2 commits January 25, 2025 19:38
…se in vectors.rs. Updates non finalized state to track invalidated_blocks
@elijahhampton elijahhampton requested a review from a team as a code owner January 26, 2025 00:47
@elijahhampton elijahhampton requested review from arya2 and removed request for a team January 26, 2025 00:47
@elijahhampton
Copy link
Contributor Author

Closes #8840 , #8841

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.

1 participant