mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-09 03:13:13 +00:00
native: remove getValidators
method
Follow https://github.com/neo-project/neo/pull/1920 .
This commit is contained in:
parent
83e94d3bbc
commit
81a11c629a
3 changed files with 11 additions and 26 deletions
|
@ -37,7 +37,7 @@ func TestNEO_Vote(t *testing.T) {
|
|||
|
||||
standBySorted := bc.GetStandByValidators()
|
||||
sort.Sort(standBySorted)
|
||||
pubs, err := neo.GetValidatorsInternal(bc, ic.DAO)
|
||||
pubs, err := neo.ComputeNextBlockValidators(bc, ic.DAO)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, standBySorted, pubs)
|
||||
|
||||
|
@ -68,10 +68,8 @@ func TestNEO_Vote(t *testing.T) {
|
|||
require.NoError(t, neo.VoteInternal(ic, h, candidates[i]))
|
||||
}
|
||||
|
||||
require.NoError(t, neo.OnPersist(ic))
|
||||
|
||||
// We still haven't voted enough validators in.
|
||||
pubs, err = neo.GetValidatorsInternal(bc, ic.DAO)
|
||||
pubs, err = neo.ComputeNextBlockValidators(bc, ic.DAO)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, standBySorted, pubs)
|
||||
|
||||
|
@ -93,7 +91,7 @@ func TestNEO_Vote(t *testing.T) {
|
|||
}
|
||||
|
||||
require.NoError(t, neo.OnPersist(ic))
|
||||
pubs, err = neo.GetValidatorsInternal(bc, ic.DAO)
|
||||
pubs, err = neo.ComputeNextBlockValidators(bc, ic.DAO)
|
||||
require.NoError(t, err)
|
||||
sortedCandidates := candidates.Copy()
|
||||
sort.Sort(sortedCandidates)
|
||||
|
@ -106,7 +104,7 @@ func TestNEO_Vote(t *testing.T) {
|
|||
require.Error(t, neo.VoteInternal(ic, h, candidates[0]))
|
||||
require.NoError(t, neo.OnPersist(ic))
|
||||
|
||||
pubs, err = neo.GetValidatorsInternal(bc, ic.DAO)
|
||||
pubs, err = neo.ComputeNextBlockValidators(bc, ic.DAO)
|
||||
require.NoError(t, err)
|
||||
for i := range pubs {
|
||||
require.NotEqual(t, candidates[0], pubs[i])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue