mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-09 03:13:13 +00:00
native: implement NEO.UnregisterCandidate
method
This commit is contained in:
parent
38a92323c9
commit
8af3f05358
2 changed files with 36 additions and 0 deletions
|
@ -92,4 +92,13 @@ func TestNEO_Vote(t *testing.T) {
|
|||
pubs, err = neo.GetValidatorsInternal(bc, ic.DAO)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, candidates, pubs)
|
||||
|
||||
require.NoError(t, neo.UnregisterCandidateInternal(ic, candidates[0]))
|
||||
require.Error(t, neo.VoteInternal(ic, h, candidates[0]))
|
||||
|
||||
pubs, err = neo.GetValidatorsInternal(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