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

x/claimsmanager/keeper: clarify why .Claims filterPaginate ends iteration on finding a single claim with the same chainId #1216

Open
odeke-em opened this issue Mar 2, 2024 · 0 comments

Comments

@odeke-em
Copy link
Contributor

odeke-em commented Mar 2, 2024

I was just auditing the code in here and wondered why this condition exists

if claim.ChainId == req.ChainId {
claims = append(claims, claim)
return true, nil
}

Is that there will be exactly one claim per chainID and if so, can we please add a comment in that code about the invariant/assumption? Thank you

/cc @joe-bowman @faddat

@joe-bowman joe-bowman added this to the v1.6.0 milestone Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants