Skip to content

PLEX-2783 N-08 LP: ensure heads not nil before dereferencing#437

Open
dhaidashenko wants to merge 1 commit intofix/PLEX-2791-N-06-improve-lp-health-observabilityfrom
fix/PLEX-2793-N-08-ensure-heads-not-nil
Open

PLEX-2783 N-08 LP: ensure heads not nil before dereferencing#437
dhaidashenko wants to merge 1 commit intofix/PLEX-2791-N-06-improve-lp-health-observabilityfrom
fix/PLEX-2793-N-08-ensure-heads-not-nil

Conversation

@dhaidashenko
Copy link
Copy Markdown
Contributor

Problem

Nil Head Returns Can Panic LogPoller Polling and Replay Paths

The latestBlocks, latestSafeBlock, and Replay functions dereference *Head values without checking for nil on success, which can result in a panic on the log poll or replay attempt instead of a controlled failure.

Fix

Both HeadTracker and RPC client implementation guarantee that the returned Head won't be nil. However, we should not trust the implementation details, so it's better to add safeguards to avoid panic.

@dhaidashenko dhaidashenko requested a review from a team as a code owner April 20, 2026 14:48
@github-actions
Copy link
Copy Markdown
Contributor

✅ API Diff Results - No breaking changes


📄 View full apidiff report

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