-
Notifications
You must be signed in to change notification settings - Fork 418
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
Streamline Stargate/gRPC querier interfaces #2093
base: main
Are you sure you want to change the base?
Conversation
// RejectStargateQuerier is a querier that rejects all stargate queries. | ||
// | ||
// Use AcceptListStargateQuerier instead to create a list of accepted query types. | ||
func RejectStargateQuerier(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) { |
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 guess this is breaking since it changes the signature of a public function.
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.
Yes, that's breaking. I would assume that most people don't use the RejectStargateQuerier directly, since it's the default anyways, but not sure.
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.
Github only finds copies, no usage: https://github.com/search?q=RejectStargateQuerier&type=code
So probably a good change to include in 0.55
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2093 +/- ##
==========================================
- Coverage 42.99% 42.99% -0.01%
==========================================
Files 85 85
Lines 11601 11600 -1
==========================================
- Hits 4988 4987 -1
- Misses 6166 6167 +1
+ Partials 447 446 -1
|
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
} | ||
|
||
var _ stargateQuerierFn = RejectStargateQuerier // just a type check |
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.
Nice
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.
Nice! LGTM 👍
Thanks for the reviews. Feel free to merge whenever you consider it useful for 0.55. |
This PR aims to improve readbility of the Stargate/gRPC querier interfaces and implementations. It helped me reason about what chains need to do to override defaults. Hope it helps someone.