-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: add set oracles at ApplyUpgrade #586
Conversation
Co-authored-by: Youngjoon Lee <taxihighway@gmail.com>
…nto ft/569/oracle-upgrade-handler # Conflicts: # cmd/panacead/cmd/genoracle.go # proto/panacea/oracle/v2/oracle.proto
…nto ft/570/upgrade-endblocker
…ft/571/upgrade-oracle-tx # Conflicts: # proto/panacea/oracle/v2/oracle.proto # proto/panacea/oracle/v2/proposal.proto # proto/panacea/oracle/v2/query.proto # x/oracle/types/errors.go # x/oracle/types/keys.go # x/oracle/types/oracle.go # x/oracle/types/oracle.pb.go # x/oracle/types/query.pb.go # x/oracle/types/query.pb.gw.go
…ft/575/upgrade-proto # Conflicts: # proto/panacea/oracle/v2/oracle.proto # proto/panacea/oracle/v2/proposal.proto # proto/panacea/oracle/v2/query.proto # x/oracle/types/keys.go # x/oracle/types/oracle.pb.go # x/oracle/types/query.pb.go # x/oracle/types/query.pb.gw.go
This reverts commit 44a3f47.
…upgrade" This reverts commit f73a2ca.
…1/upgrade-oracle-tx # Conflicts: # proto/panacea/oracle/v2/oracle.proto # proto/panacea/oracle/v2/proposal.proto # x/oracle/keeper/grpc_query_oracle.go # x/oracle/types/keys.go # x/oracle/types/oracle.pb.go
This reverts commit b54727f.
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.
Thank you.
I left a comment.
x/oracle/keeper/upgrade.go
Outdated
uniqueID, address := types.SplitOracleUpgradeKey(iterator.Key()) | ||
oracleUpgrade, err := k.GetOracleUpgrade(ctx, uniqueID, address.String()) | ||
if err != nil { | ||
return err | ||
} |
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 change like below:
We don't have to called GetOracle(...) function.
uniqueID, address := types.SplitOracleUpgradeKey(iterator.Key()) | |
oracleUpgrade, err := k.GetOracleUpgrade(ctx, uniqueID, address.String()) | |
if err != nil { | |
return err | |
} | |
bz := iterator.Value() | |
oracleUpgrade := &types.OracleUpgrade{} | |
if err := k.cdc.UnmarshalLengthPrefixed(bz, oracleUpgrade); err != nil { | |
return err | |
} |
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 fixed it in 0e5ad56. Please check again, thanks.
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.
lgtm.
…pgrade-oracle # Conflicts: # x/oracle/abci_test.go # x/oracle/keeper/oracle_test.go # x/oracle/keeper/upgrade.go # x/oracle/types/errors.go # x/oracle/types/keys.go # x/oracle/types/oracle.go
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.
LGTM
As discussed in #582 (comment), instead of applying the queue as in PR #584, change it to check the
EncryptedOraclePrivKey
in theOracleUpgrade
store.Existing PR #584 will be closed.