-
Notifications
You must be signed in to change notification settings - Fork 608
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 filtered paginate in the incentives module #1218
Comments
@xBalbinus |
I don't think this issue was officially closed, if it already follows then closing is no problem |
@ValarDragon can u add more details? |
Theres a few queries in the incentives modules that just do filtered paginate incorrectly, https://github.com/osmosis-labs/osmosis/blob/main/x/incentives/keeper/grpc_query.go#L124-L132 Its getting all active gauges and filtering, inside the loop. That loop should instead be reading off the key / value, and seeing if its valid. Rather than reading all of it. But to be honest, most of the filtered paginate calls in that file are suspicious / wrong. (E.g. a lot that don't do any filtering!) |
@xBalbinus @ValarDragon could u take a look at this pr. I think it can close this issue. Thank u so much! |
A kind reminder that Bez commented something you may want to change, otherwise I defer to @ValarDragon’s judgement because I have less context |
FilteredPaginate does pagination of all the results in the PrefixStore based on the provided PageRequest.
We need to make the incentives module follow this
https://github.com/cosmos/cosmos-sdk/blob/master/types/query/filtered_pagination.go
Please feel free to add more details @ValarDragon
The text was updated successfully, but these errors were encountered: