Compare commits

..

3 commits

Author SHA1 Message Date
201db45bd7
[#142] common: Update version
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-12-12 15:25:14 +03:00
e002a1fa80
[#142] common: Downgrade previous version
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-12-12 15:25:02 +03:00
31709a3d95
[#141] frostfsid: Remove address index in DeleteSubject()
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-12-12 14:42:03 +03:00
4 changed files with 12 additions and 4 deletions

View file

@ -1 +1 @@
v0.21.0
v0.21.1

View file

@ -5,14 +5,14 @@ import "github.com/nspcc-dev/neo-go/pkg/interop/native/std"
const (
major = 0
minor = 21
patch = 0
patch = 1
// Versions from which an update should be performed.
// These should be used in a group (so prevMinor can be equal to minor if there are
// any migration routines.
prevMajor = 0
prevMinor = 20
prevPatch = 0
prevMinor = 19
prevPatch = 4
Version = major*1_000_000 + minor*1_000 + patch

View file

@ -401,6 +401,7 @@ func DeleteSubject(addr interop.Hash160) {
storage.Delete(ctx, subjectAdditionalKey(subj.AdditionalKeys[i], addr))
storage.Delete(ctx, addressKey(contract.CreateStandardAccount(subj.AdditionalKeys[i])))
}
storage.Delete(ctx, addressKey(addr))
storage.Delete(ctx, sKey)
removeSubjectFromNamespace(ctx, subj.Namespace, addr)

View file

@ -629,6 +629,9 @@ func TestAdditionalKeyFromPrimarySubject(t *testing.T) {
subjDPrimaryKey, err := keys.NewPrivateKey()
require.NoError(t, err)
subjFPrimaryKey, err := keys.NewPrivateKey()
require.NoError(t, err)
invoker.Invoke(t, stackitem.Null{}, createSubjectMethod, defaultNamespace, subjAPrimaryKey.PublicKey().Bytes())
invoker.Invoke(t, stackitem.Null{}, createSubjectMethod, defaultNamespace, subjBPrimaryKey.PublicKey().Bytes())
@ -647,6 +650,10 @@ func TestAdditionalKeyFromPrimarySubject(t *testing.T) {
invoker.InvokeFail(t, "key is occupied", addSubjectKeyMethod, subjAKeyAddr, subjDPrimaryKey.PublicKey().Bytes())
invoker.Invoke(t, stackitem.Null{}, deleteSubjectMethod, subjBKeyAddr)
invoker.Invoke(t, stackitem.Null{}, addSubjectKeyMethod, subjAKeyAddr, subjDPrimaryKey.PublicKey().Bytes())
invoker.Invoke(t, stackitem.Null{}, createSubjectMethod, defaultNamespace, subjFPrimaryKey.PublicKey().Bytes())
invoker.Invoke(t, stackitem.Null{}, deleteSubjectMethod, subjFPrimaryKey.PublicKey().GetScriptHash())
invoker.Invoke(t, stackitem.Null{}, createSubjectMethod, defaultNamespace, subjFPrimaryKey.PublicKey().Bytes())
}
func checkPublicKeyResult(t *testing.T, s *vm.Stack, err error, key *keys.PrivateKey) {