[#95] frostfsid: Remove outdated data on update

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-06-04 11:30:07 +03:00
parent 694daebb19
commit cdfd7cb028

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