Skip to content

beacon/blsync: add finality test case #32228

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

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

Conversation

Caplost
Copy link

@Caplost Caplost commented Jul 17, 2025

Summary

Adds a comprehensive test case for finality update functionality in the beacon block sync module.

Changes

  • Added TestBlockSyncFinality function to verify finality updates
  • Extended testHeadTracker with finalized field support
  • Enhanced ValidatedOptimistic and ValidatedFinality methods

Testing

  • New test verifies chain head events include correct finality information
  • All existing tests continue to pass
  • Test covers both optimistic and finality update scenarios

Validation

  • ✅ Unit tests pass
  • ✅ Integration with existing test framework
  • ✅ Proper event handling verification

This commit adds a comprehensive test case for the finality update
functionality in the beacon block sync module. The test verifies:

- Chain head events are properly triggered for optimistic updates
- Finality information is correctly included in chain head events
- The block sync properly handles both optimistic and finality updates

The test uses two different blocks to ensure proper event triggering
and validates that finalized block hashes are correctly propagated
through the chain head event system.
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