-
Notifications
You must be signed in to change notification settings - Fork 346
IIP50 slash unqualified candidates #4678
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?
Conversation
ab43c26
to
3794c6e
Compare
action/protocol/rewarding/reward.go
Outdated
filteredCandidates := make([]*state.Candidate, 0) | ||
for _, candidate := range candidates { | ||
if _, ok := exemptAddrs[candidate.Address]; ok { | ||
continue | ||
} | ||
filteredCandidates = append(filteredCandidates, candidate) | ||
} | ||
candidates = filteredCandidates |
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 also included in hard fork?
return errors.Wrap(err, "failed to fetch bucket") | ||
} | ||
prevWeightedVotes := p.calculateVoteWeight(bucket, true) | ||
bucket.StakedAmount.Sub(bucket.StakedAmount, amount) |
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.
need a negative check of the bucket amount for safety
action/protocol/rewarding/reward.go
Outdated
} | ||
candidates = filteredCandidates | ||
// TODO: add hardfork | ||
slashAmount, err := p.slashUqd(ctx, sm, candidates, a.blockReward, uqdMap) |
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.
transfer slash amount to rewarding pool, and new a TransactionLog for it
b26a0ee
to
4d14ae8
Compare
0b45a05
to
155905c
Compare
155905c
to
09c6ea3
Compare
|
slash in epoch reward grant action handling
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: