mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
native: fix a bug in GetCommitteeMembers
Return standby committee instead of validators.
This commit is contained in:
parent
b0c051b817
commit
dce456f77f
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue