frostfsid: Remove old data on update #95

Merged
fyrchik merged 2 commits from fyrchik/frostfs-contract:fix-frostfsid-update into support/v0.19 2024-06-04 10:54:27 +00:00
3 changed files with 13 additions and 2 deletions

View File

@ -1 +1 @@
v0.19.1
v0.19.3

View File

@ -5,7 +5,7 @@ import "github.com/nspcc-dev/neo-go/pkg/interop/native/std"
const (
major = 0
minor = 19
patch = 1
patch = 3
// 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

View File

@ -73,6 +73,17 @@ const (
func _deploy(data any, isUpdate bool) {
ctx := storage.GetContext()
if isUpdate {
storage.Delete(ctx, "netmapScriptHash")
storage.Delete(ctx, "containerScriptHash")
it := storage.Find(ctx, "o", storage.KeysOnly)
for iterator.Next(it) {
key := iterator.Value(it)
storage.Delete(ctx, key)
}
}
args := data.(struct {
admin interop.Hash160
})