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

feat(header): cache hash #3975

Closed
wants to merge 7 commits into from
Closed

feat(header): cache hash #3975

wants to merge 7 commits into from

Conversation

cristaloleg
Copy link
Contributor

Closes #2959 and Closes #3189

@cristaloleg cristaloleg added the kind:feat Attached to feature PRs label Dec 2, 2024
@cristaloleg cristaloleg self-assigned this Dec 2, 2024
@cristaloleg cristaloleg mentioned this pull request Dec 2, 2024
Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

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

I carefully reviewed this again and realized that we actually don't need this change.

Here we check that the result of local hashing is equal to what we have in the commit already. So when we return from commit we know its something we computed ourselves. Therefore, we keep returning hash from the commit and there is no need to add recompute value and synchronization around it.

@cristaloleg
Copy link
Contributor Author

Closing as not needed (see Hlib's review comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:feat Attached to feature PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

header.go: Hash() should recompute / read from cached value of actually computed hash of header
2 participants