Skip to content

beacon/blsync: Add comprehensive finality test coverage #32196

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 1 commit into
base: master
Choose a base branch
from

Conversation

floor-licker
Copy link

Summary

Adds comprehensive test coverage for beacon block sync finality handling in response to the TODO comment noting the gap in coverage.

Changes Made

  • New Test Function: TestBlockSyncFinality() with comprehensive finality scenarios
  • Enhanced Test Infrastructure: Updated testHeadTracker to support proper finality testing
  • Improved Documentation: Added detailed comments explaining beacon chain finality concepts

Test Scenarios Covered

  1. Basic finality with proper finality update - Tests normal case with attested and finalized blocks
  2. No finality update available - Tests fallback behavior when no finality data exists
  3. Direct ValidatedFinality method testing - Tests the finality method directly

Testing

  • All existing tests continue to pass
  • New test passes consistently
  • Verified with go test ./beacon/blsync -v

@floor-licker
Copy link
Author

Hey @zsfelfoldi - just wanted to check if you had a chance to review this.

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