native: fix a bug in GetCommitteeMembers

Return standby committee instead of validators.
This commit is contained in:
Evgenii Stratonikov 2020-08-27 18:05:26 +03:00
parent b0c051b817
commit dce456f77f
2 changed files with 7 additions and 2 deletions

View file

@ -485,13 +485,13 @@ func (n *NEO) GetCommitteeMembers(bc blockchainer.Blockchainer, d dao.DAO) (keys
votersCount.Mul(votersCount, big.NewInt(effectiveVoterTurnout))
voterTurnout := votersCount.Div(votersCount, n.getTotalSupply(d))
if voterTurnout.Sign() != 1 {
return bc.GetStandByValidators(), nil
return bc.GetStandByCommittee(), nil
}
cs, err := n.getCandidates(d)
if err != nil {
return nil, err
}
sbVals := bc.GetStandByValidators()
sbVals := bc.GetStandByCommittee()
count := len(sbVals)
if len(cs) < count {
return sbVals, nil