[#95] frostfsid: Remove outdated data on update
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
694daebb19
commit
cdfd7cb028
1 changed files with 11 additions and 0 deletions
|
@ -73,6 +73,17 @@ const (
|
||||||
func _deploy(data any, isUpdate bool) {
|
func _deploy(data any, isUpdate bool) {
|
||||||
ctx := storage.GetContext()
|
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 {
|
args := data.(struct {
|
||||||
admin interop.Hash160
|
admin interop.Hash160
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue