core: fix ineffassign warning in test code

ineffectual assignment to err (ineffassign)
This commit is contained in:
Roman Khimov 2021-05-12 19:37:14 +03:00
parent ec50bb4041
commit 4cd3da99b4
3 changed files with 5 additions and 2 deletions

View file

@ -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)