Skip to content

Conversation

@pmikolajczyk41
Copy link
Member

@pmikolajczyk41 pmikolajczyk41 commented Nov 21, 2025

part of NIT-3936

In setHead, the first batch.Write() call lacks error handling, unlike the subsequent call which checks and logs a critical error on failure. Missing the first check can hide DB write errors and leave the header chain in an inconsistent state during rewinds.

Wrapping the first batch.Write() with if err := batch.Write(); err != nil { } and handling consistently (log.Crit) - keeps behavior aligned with the second call.

The upstream code differs and doesn't have that unhandled Write() operation.

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.

3 participants