Skip to content

Commit

Permalink
fix candidate votes
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Apr 28, 2024
1 parent 999e634 commit 896be52
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion action/protocol/staking/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,12 @@ func (p *Protocol) contractStakingVotes(ctx context.Context, candidate address.A
if b.isUnstaked() {
continue
}
votes.Add(votes, p.calculateVoteWeight(b, false))
if featureCtx.FixContractStakingWeightedVotes {
votes.Add(votes, p.calculateVoteWeight(b, false))
} else {
votes.Add(votes, b.StakedAmount)
}

}
}
return votes, nil
Expand Down

0 comments on commit 896be52

Please sign in to comment.