-
Notifications
You must be signed in to change notification settings - Fork 38
fix: query all proposals #642
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
Conversation
case count < limit: | ||
kv, err := iterator.KeyValue() | ||
if err != nil { | ||
if strings.Contains(err.Error(), "no concrete type registered for type URL") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the fix
This comment has been minimized.
This comment has been minimized.
case count == limit: | ||
key, err := iterator.Key() | ||
if err != nil { | ||
if strings.Contains(err.Error(), "no concrete type registered for type URL") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added here as well just incase
} else { | ||
kv, err := iterator.KeyValue() | ||
if err != nil { | ||
if strings.Contains(err.Error(), "no concrete type registered for type URL") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added here as well just incase
} | ||
|
||
kv, err := iterator.KeyValue() | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we missing the fix here as well? This is called when the key
param is provided for pagination afaik
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good shout added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the fix lines, I did not review that they match the original function. The fix lines look correct to me.
Description
fix query:
osmosisd q gov proposals --output json --page-reverse
Currently on mainnet this fails:
osmosisd q gov proposals --output json --page-reverse --node https://rpc.osmosis.zone
The number of proposals that are ignored is:
855 - 847 = 8
see: https://www.mintscan.io/osmosis/proposals