-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Use gRPC in GetCmdQueryValidators #7626
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,19 +52,6 @@ func (ctx Context) QueryABCI(req abci.RequestQuery) (abci.ResponseQuery, error) | |
return ctx.queryABCI(req) | ||
} | ||
|
||
// QuerySubspace performs a query to a Tendermint node with the provided | ||
// store name and subspace. It returns key value pair and height of the query | ||
// upon success or an error if the query fails. | ||
func (ctx Context) QuerySubspace(subspace []byte, storeName string) (res []sdk.KVPair, height int64, err error) { | ||
resRaw, height, err := ctx.queryStore(subspace, storeName, "subspace") | ||
if err != nil { | ||
return res, height, err | ||
} | ||
|
||
ctx.LegacyAmino.MustUnmarshalBinaryBare(resRaw, &res) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fmt.Printlned the This means that the client.Context would need to hold a reference to the BinaryMarshaler too, which seems like a code smell. Instead, I deleted this function (only used in 1 place), and used gRPC queries in GetCmdQueryValidators. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, I assume we are.ok to delete this public function? |
||
return | ||
} | ||
|
||
// GetFromAddress returns the from address from the context's name. | ||
func (ctx Context) GetFromAddress() sdk.AccAddress { | ||
return ctx.FromAddress | ||
|
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.
Why do you change this?
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.
#7597 (comment)