-
Notifications
You must be signed in to change notification settings - Fork 42
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 query endpoint for subcribers who are validators, simplify AddPublisher proposal #277
Conversation
EricBolten
commented
Feb 3, 2024
•
edited
Loading
edited
- Run one query to return all subscribers who are also validators
- Allow governance to update an existing publisher
func (k Keeper) GetValidatorSubscribers(ctx sdk.Context) (subscribers []*types.Subscriber) { | ||
allSubscribers := k.GetSubscribers(ctx) | ||
for _, subscriber := range allSubscribers { | ||
subscriberAddress, err := sdk.AccAddressFromBech32(subscriber.Address) |
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 have ptsd from this method now. As long as we're confident it's impossible to get a non-somm prefixed address through AddSubcriber
this is fine
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.
changing it to log an error and continue instead for now
Confirmed with @cbrit on Telegram. |