-
Notifications
You must be signed in to change notification settings - Fork 404
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
Restrict pagination on all-state-query #1619
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1619 +/- ##
==========================================
+ Coverage 56.59% 56.62% +0.02%
==========================================
Files 64 64
Lines 8755 8760 +5
==========================================
+ Hits 4955 4960 +5
- Misses 3414 3415 +1
+ Partials 386 385 -1
|
@@ -368,7 +368,10 @@ func GetCmdGetContractStateAll() *cobra.Command { | |||
SilenceUsage: true, | |||
} | |||
flags.AddQueryFlagsToCmd(cmd) | |||
flags.AddPaginationFlagsToCmd(cmd, "contract state") | |||
cmd.Flags().String(flags.FlagPageKey, "", "pagination page-key of contract state to query for") | |||
cmd.Flags().Uint64(flags.FlagLimit, 100, "pagination limit of contract state to query for") |
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.
👍
}, | ||
"with pagination count": { | ||
srcQuery: &types.QueryAllContractStateRequest{ | ||
Address: contractAddr.String(), |
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 test 👍
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 👍
Iterating via key is the best performing option.