Skip to content
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

Add block header to validation failure #1752

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

edmundnoble
Copy link
Contributor

Last validation error I couldn't see the block height of the block that failed to validate. Maybe I missed it somewhere, but this includes it in the error.

@@ -532,7 +532,8 @@ validateHashes bHeader pData miner transactions =
then Right pwo
else Left $ BlockValidationFailure $ BlockValidationFailureMsg $
J.encodeJsonText $ J.object
[ "mismatch" J..= errorMsg "Payload hash" prevHash newHash
[ "header" J..= J.encodeWithAeson (ObjectEncoded bHeader)
Copy link

@ghost ghost Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe worth adding a test to fix in the code the expected format?

@edmundnoble edmundnoble enabled auto-merge October 17, 2023 18:14
@edmundnoble edmundnoble added this pull request to the merge queue Oct 20, 2023
Merged via the queue into master with commit b75d7d7 Oct 20, 2023
34 of 39 checks passed
@ghost ghost deleted the edmund/add-header-to-validation-failure branch October 23, 2023 10:15
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