Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Jul 11, 2023
1 parent bf485f5 commit 07e4225
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion action/protocol/staking/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,9 @@ func (p *Protocol) ActiveCandidates(ctx context.Context, sr protocol.StateReader
}
list := c.AllCandidates()
cand := make(CandidateList, 0, len(list))
featureCtx := protocol.MustGetFeatureCtx(ctx)
for i := range list {
if p.contractStakingIndexer != nil && protocol.MustGetFeatureCtx(ctx).AddContractStakingVotes {
if p.contractStakingIndexer != nil && featureCtx.AddContractStakingVotes {
list[i].Votes.Add(list[i].Votes, p.contractStakingIndexer.CandidateVotes(list[i].Owner))
}
if list[i].SelfStake.Cmp(p.config.RegistrationConsts.MinSelfStake) >= 0 {
Expand Down

0 comments on commit 07e4225

Please sign in to comment.