fix(core): include build metadata in bad block logs#2270
fix(core): include build metadata in bad block logs#2270gzliudan wants to merge 1 commit intoXinFinOrg:dev-upgradefrom
Conversation
Log the client version and git commit hash in reportBlock output. This makes bad block reports easier to correlate with the running binary.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR enhances bad block reporting by including the running binary’s client version and git commit hash in the reportBlock error output, making operational incident correlation easier.
Changes:
- Import internal build/version helpers (
internal/version) intocore/blockchain.go. - Capture VCS commit information (when available) and include it in the BAD BLOCK log output.
- Include the client version string (with metadata) alongside commit hash in the BAD BLOCK log header.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Proposed changes
Log the client version and git commit hash in reportBlock output. This makes bad block reports easier to correlate with the running binary.
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which parts of the codebase does this PR touch?
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that