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
|
@ -146,6 +146,7 @@ func deployContractCmd(cmd *cobra.Command, args []string) error {
|
|||
}
|
||||
}
|
||||
if needRecord {
|
||||
emit.AppCall(bw.BinWriter, nnsCs.Hash, "deleteRecords", callflag.All, domain, int64(nns.TXT))
|
||||
emit.AppCall(bw.BinWriter, nnsCs.Hash, "addRecord", callflag.All,
|
||||
domain, int64(nns.TXT), address.Uint160ToString(cs.Hash))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue