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 proper saving for last tick quorum data per epoch interval #78

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

LINCKODE
Copy link
Member

@LINCKODE LINCKODE commented Dec 3, 2024

No description provided.

return interval, nil
}

return nil, errors.New(fmt.Sprintf("unable to find processed tick intervals for epoch %d", epoch))
Copy link
Contributor

Choose a reason for hiding this comment

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

errors.Errorf should be used instead of errors.New with Sprintf

return nil, errors.New(fmt.Sprintf("unable to find processed tick intervals for epoch %d", epoch))
}

func IsLast(tickNumber uint32, epoch uint32, intervals []*protobuff.ProcessedTickIntervalsPerEpoch) (bool, int, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this function is not self explanatory from the definition, you either redefine it or if you can't change it to make it more explanatory, then adding a comment is mandatory

store/store.go Outdated
for key, qd := range lastQuorumDataPerEpochIntervals.QuorumDataPerInterval {

if qd != nil {
fmt.Printf("DEBUG: %d %d\n", key, qd.QuorumTickStructure.TickNumber)
Copy link
Contributor

Choose a reason for hiding this comment

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

do you need to remove the debug print statements?

@0xluk 0xluk merged commit 7e06094 into dev Dec 3, 2024
3 checks passed
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