forked from TrueCloudLab/frostfs-node
[#888] neofs-adm: use constant for update methods
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
31b3c71457
commit
f836e7c1dc
1 changed files with 3 additions and 3 deletions
|
@ -74,12 +74,12 @@ func (c *initializeContext) deployNNS(method string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if _, err := c.Client.GetContractStateByHash(cs.Hash); err == nil && method != "update" {
|
||||
if _, err := c.Client.GetContractStateByHash(cs.Hash); err == nil && method != updateMethodName {
|
||||
return nil
|
||||
}
|
||||
|
||||
params := getContractDeployParameters(cs.RawNEF, cs.RawManifest, nil)
|
||||
if method == "update" {
|
||||
if method == updateMethodName {
|
||||
params = params[:len(params)-1] // update has only NEF and manifest args
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ func (c *initializeContext) deployNNS(method string) error {
|
|||
}
|
||||
|
||||
mgmtHash := c.nativeHash(nativenames.Management)
|
||||
if method == "update" {
|
||||
if method == updateMethodName {
|
||||
nnsCs, err := c.Client.GetContractStateByID(1)
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't resolve NNS hash for contract update: %w", err)
|
||||
|
|
Loading…
Reference in a new issue