Skip to content

Commit

Permalink
fix a bug in vote reviser (#4313)
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderZhi authored Jun 26, 2024
1 parent b558929 commit 8c1f378
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions action/protocol/staking/vote_reviser.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ func (vr *VoteReviser) calculateVoteWeight(csm CandidateStateManager) (Candidate
}
candm := make(map[string]*Candidate)
for _, cand := range cands {
candm[cand.Owner.String()] = cand.Clone()
candm[cand.Owner.String()].Votes = new(big.Int)
candm[cand.Owner.String()].SelfStake = new(big.Int)
candm[cand.GetIdentifier().String()] = cand.Clone()
candm[cand.GetIdentifier().String()].Votes = new(big.Int)
candm[cand.GetIdentifier().String()].SelfStake = new(big.Int)
}
buckets, _, err := csr.getAllBuckets()
switch {
Expand Down

0 comments on commit 8c1f378

Please sign in to comment.