-
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
Conversation
Codecov Report
@@ Coverage Diff @@
## robert/validator-pubkey #7626 +/- ##
===========================================================
- Coverage 59.82% 57.23% -2.60%
===========================================================
Files 317 453 +136
Lines 17992 27723 +9731
===========================================================
+ Hits 10763 15866 +5103
- Misses 6081 10331 +4250
- Partials 1148 1526 +378 |
return res, height, err | ||
} | ||
|
||
ctx.LegacyAmino.MustUnmarshalBinaryBare(resRaw, &res) |
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 fmt.Printlned the res
here, it's a []KVPair
of []bytes->[]bytes
, and I'm assuming those bytes are proto-encoded.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
So, I assume we are.ok to delete this public function?
@@ -22,7 +22,7 @@ import ( | |||
|
|||
func TestMsgService(t *testing.T) { | |||
priv, _, _ := testdata.KeyTestPubAddr() | |||
encCfg := simapp.MakeEncodingConfigTests() | |||
encCfg := simapp.MakeEncodingConfig() |
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.
return res, height, err | ||
} | ||
|
||
ctx.LegacyAmino.MustUnmarshalBinaryBare(resRaw, &res) |
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.
So, I assume we are.ok to delete this public function?
Description
to be merged into #7597
GetCmdQueryValidators
to use gRPC and outputs protoJSON instead of aminoJSON (this fixes the test)Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes