mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-08 19:10:30 +00:00
core: fix ineffassign warning in test code
ineffectual assignment to err (ineffassign)
This commit is contained in:
parent
ec50bb4041
commit
4cd3da99b4
3 changed files with 5 additions and 2 deletions
|
@ -130,10 +130,10 @@ func TestDesignate_DesignateAsRole(t *testing.T) {
|
|||
ic.SpawnVM()
|
||||
ic.VM.LoadScript([]byte{byte(opcode.RET)})
|
||||
|
||||
pubs, index, err := des.GetDesignatedByRole(bc.dao, 0xFF, 255)
|
||||
_, _, err := des.GetDesignatedByRole(bc.dao, 0xFF, 255)
|
||||
require.True(t, errors.Is(err, native.ErrInvalidRole), "got: %v", err)
|
||||
|
||||
pubs, index, err = des.GetDesignatedByRole(bc.dao, noderoles.Oracle, 255)
|
||||
pubs, index, err := des.GetDesignatedByRole(bc.dao, noderoles.Oracle, 255)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, 0, len(pubs))
|
||||
require.Equal(t, uint32(0), index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue