-
Notifications
You must be signed in to change notification settings - Fork 356
Slash candidate test #4716
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
base: master
Are you sure you want to change the base?
Slash candidate test #4716
Conversation
action/protocol/staking/protocol.go
Outdated
if err := csm.updateBucket(bucket.Index, bucket); err != nil { | ||
return errors.Wrapf(err, "failed to update bucket %d", bucket.Index) | ||
} | ||
prevWeightedVotes := p.calculateVoteWeight(bucket, true) |
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 calculate pre votes after bucket amount deducted?
return errors.Wrapf(state.ErrStateNotExist, "candidate %s does not exist", owner.String()) | ||
} | ||
bucket, err := p.fetchBucket(csm, candidate.SelfStakeBucketIdx) | ||
if err != nil { |
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.
the slashed candidate may be already unstaked
1d29309
to
a80f3fc
Compare
|
jump to 1d29309 to review
Fixes #(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: