-
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
[action] Define CandidateSelfStake Action #4007
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #4007 +/- ##
==========================================
+ Coverage 75.38% 76.25% +0.87%
==========================================
Files 303 331 +28
Lines 25923 28281 +2358
==========================================
+ Hits 19541 21567 +2026
- Misses 5360 5616 +256
- Partials 1022 1098 +76 ☔ View full report in Codecov by Sentry. |
action/candidate_selfstake.go
Outdated
AbstractAction | ||
|
||
// bucketID is the bucket index want to be changed to | ||
bucketID uint64 |
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.
does it need to carry a valid endorsement for the calling delegate? otherwise how to make sure the bucket is intended (to be used) for this delegate?
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.
endorsement info will be recorded in db by another transaction CandidateEndorse
action/candidate_selfstake.go
Outdated
}, | ||
bucketID: bucketID, | ||
} | ||
} |
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.
also what about convert to/from protobuf (for storage)?
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.
another PR to handle web3 and grpc convertion
action/candidate_selfstake.go
Outdated
) | ||
|
||
// CandidateSelfStake is the action to update a candidate's bucket | ||
type CandidateSelfStake struct { |
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.
for clear naming, consider rename it to CandidateActivate
. SelfStake refers to the self-stake bucket, which now can come from either register, or endorsement.
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.
same. Updating the candidate's bucket isn't indicated by the naming
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.
Okay
5d2d6ba
to
89be7f8
Compare
fixed the issues before merging |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Description
As a part of implementation of #3981 , this pr defines the
CandidateSelfStake
action struct to make a candidate re-selfstakedFixes #(issue)
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: