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

fix(store): properly update heightSub height #205

Closed
wants to merge 2 commits into from

Conversation

cristaloleg
Copy link
Contributor

Overview

PR #186 introduced a bug which resulted in an incorrect height reported by heightSub. heightSub.Height should be updated only when all height below the current one were observed.

Fixes #201 (+ test from #197)

from, to := headers[0].Height(), headers[ln-1].Height()
if height+1 != from && height != 0 { // height != 0 is needed to enable init from any height and not only 1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Took from #197

Basically this was the last thing that was requiring adjacency in store.

@cristaloleg
Copy link
Contributor Author

See #207

@cristaloleg cristaloleg deleted the store/fix-heighsub-when-gaps branch June 27, 2024 10:03
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.

store: Head of store needs to be the *contiguous* head of the store
1 participant