-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Keystone][Deployments] Make adding NOPs and DONs idempotent #15163
Conversation
deployment/keystone/deploy.go
Outdated
} | ||
existingNopsAddrToID := make(map[string]uint32) | ||
for id, nop := range existingNops { | ||
existingNopsAddrToID[nop.Admin.String()] = uint32(id) |
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.
the admin strings are phony in some of our deployments and not unique.
maybe hash the name,addr and use that as the key
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 think you can just use the struct as the key
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.
admin addr not unique in some existing contracts. this will change won't behave as expected; simplest fix is to hash the name and admin addr as map key.
there is nothing in the contract guaranteeing unique of admin addrs.
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.
meant to request change not approve
45df325
to
29ba2c1
Compare
Similarly to adding capabilities or nodes, don't add NOPs or DONs that already exist.
29ba2c1
to
939f9f6
Compare
Similarly to adding capabilities or nodes, don't add NOPs or DONs that already exist.