Skip to content

Conversation

@dmytroheknt
Copy link
Contributor

The defer recovery handler in ExtendVote was logging err instead of r for the panic value.
At the time of logging, err is still nil (or holds a previous value) because it gets assigned after the log call. This meant we lost the actual panic information in logs.

Fixed by using r (the recovered panic value) in the logger, matching the pattern used in VerifyVoteExtension which handles this correctly.

@aljo242
Copy link
Contributor

aljo242 commented Nov 25, 2025

can you test this?

@dmytroheknt
Copy link
Contributor Author

sure, added tests for panic recovery

you can see the fix working in the test logs:

  • before: panic=null
  • after: panic="test panic message for ExtendVote"

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