[#55] Apply gofumpt

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-11-28 11:46:41 +03:00
parent 21bfe3ebf0
commit 03d0c10852
2 changed files with 2 additions and 3 deletions

View file

@ -930,6 +930,7 @@ func subjectAdditionalPrefix(additionalKey interop.PublicKey) []byte {
func namespaceKey(ns string) []byte { func namespaceKey(ns string) []byte {
return namespaceKeyFromHash(ripemd160Hash(ns)) return namespaceKeyFromHash(ripemd160Hash(ns))
} }
func namespaceKeyFromHash(ns []byte) []byte { func namespaceKeyFromHash(ns []byte) []byte {
return append([]byte{namespaceKeysPrefix}, ns...) return append([]byte{namespaceKeysPrefix}, ns...)
} }

View file

@ -254,7 +254,6 @@ func TestFrostFSID_SubjectManagement(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
require.Len(t, addresses, 2) require.Len(t, addresses, 2)
require.ElementsMatch(t, addresses, []util.Uint160{subjKeyAddr, newSubjKey.PublicKey().GetScriptHash()}) require.ElementsMatch(t, addresses, []util.Uint160{subjKeyAddr, newSubjKey.PublicKey().GetScriptHash()})
}) })
anonInvoker.InvokeFail(t, notWitnessedError, deleteSubjectMethod, subjKeyAddr) anonInvoker.InvokeFail(t, notWitnessedError, deleteSubjectMethod, subjKeyAddr)
@ -359,7 +358,6 @@ func TestFrostFSIS_GroupNameRelatedInvariants(t *testing.T) {
invoker.InvokeFail(t, "not available", createGroupMethod, ns1, groupName2) invoker.InvokeFail(t, "not available", createGroupMethod, ns1, groupName2)
invoker.Invoke(t, stackitem.Make(3), createGroupMethod, ns2, groupName2) invoker.Invoke(t, stackitem.Make(3), createGroupMethod, ns2, groupName2)
// Check that we cannot find group id by name for group that was removed // Check that we cannot find group id by name for group that was removed
invoker.Invoke(t, stackitem.Null{}, deleteGroupMethod, ns1, groupID2) invoker.Invoke(t, stackitem.Null{}, deleteGroupMethod, ns1, groupID2)
s, err = invoker.TestInvoke(t, getGroupIDByNameMethod, ns1, groupName2) s, err = invoker.TestInvoke(t, getGroupIDByNameMethod, ns1, groupName2)
@ -369,7 +367,7 @@ func TestFrostFSIS_GroupNameRelatedInvariants(t *testing.T) {
invoker.Invoke(t, stackitem.Make(4), createGroupMethod, ns1, groupName2) invoker.Invoke(t, stackitem.Make(4), createGroupMethod, ns1, groupName2)
// Check that after group renaming its id cannot be found by old name // Check that after group renaming its id cannot be found by old name
newGroupName:= "new" newGroupName := "new"
invoker.Invoke(t, stackitem.Null{}, setGroupNameMethod, ns1, groupID1, newGroupName) invoker.Invoke(t, stackitem.Null{}, setGroupNameMethod, ns1, groupID1, newGroupName)
s, err = invoker.TestInvoke(t, getGroupIDByNameMethod, ns1, groupName1) s, err = invoker.TestInvoke(t, getGroupIDByNameMethod, ns1, groupName1)
checkGroupIDResult(t, s, err, -1) checkGroupIDResult(t, s, err, -1)