-
Notifications
You must be signed in to change notification settings - Fork 324
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
[ioctl] support querying delegate by operator address #3904
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3904 +/- ##
==========================================
+ Coverage 75.38% 76.09% +0.71%
==========================================
Files 303 327 +24
Lines 25923 27833 +1910
==========================================
+ Hits 19541 21179 +1638
- Misses 5360 5563 +203
- Partials 1022 1091 +69
... and 6 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
ioctl/cmd/bc/bcdelegate.go
Outdated
return nil, output.NewError(output.UndefinedError, "failed to find delegate", nil) | ||
} | ||
|
||
func getDelegates(cli iotexapi.APIServiceClient, offset, limit uint32) (candidateList *iotextypes.CandidateListV2, err 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.
there is already same func getStakingCandidates()
in nodedelegate.go
move it to /util so can re-use the code?
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.
good advice
ioctl/cmd/bc/bcdelegate.go
Outdated
defer conn.Close() | ||
cli := iotexapi.NewAPIServiceClient(conn) | ||
|
||
readCandidatesLimit := 20000 |
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.
200 works and is maybe better?
@@ -366,39 +365,3 @@ func getAllStakingCandidates(chainClient iotexapi.APIServiceClient) (candidateLi | |||
} | |||
return | |||
} | |||
|
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.
move to util pkg to reuse it
ioctl/util/chain_api.go
Outdated
@@ -13,6 +13,7 @@ const ( | |||
_stakingProtocol = "staking" | |||
) | |||
|
|||
// GetStakingBuckets returns staking buckets |
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.
GetStakingCandidates returns ...
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Description
Fixes #3900
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: