forked from TrueCloudLab/frostfs-node
[#1749] neofs-adm: Delete NNS records before updating
In case we already have the record and it is invalid, we should overwrite it instead of having several conflicting records. Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
0818d8d43a
commit
fe0c6db67d
3 changed files with 5 additions and 2 deletions
|
@ -273,6 +273,7 @@ func (c *initializeContext) updateContracts() error {
|
|||
}
|
||||
if !ok {
|
||||
w.WriteBytes(script)
|
||||
emit.AppCall(w.BinWriter, nnsHash, "deleteRecords", callflag.All, domain, int64(nns.TXT))
|
||||
emit.AppCall(w.BinWriter, nnsHash, "addRecord", callflag.All,
|
||||
domain, int64(nns.TXT), cs.Hash.StringLE())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue