[#768] adm: Rephrase error text for NNS fetch

Error could come from the network, we must not assume everything.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-01-24 11:04:37 +03:00 committed by Evgenii Stratonikov
parent c00eb7ccee
commit 61a3afbf9b

View file

@ -541,7 +541,7 @@ func (c *initializeContext) getContractDeployData(ctrName string, keysParam []an
r := management.NewReader(c.ReadOnlyInvoker)
nnsCs, err := r.GetContractByID(1)
if err != nil {
return nil, errors.New("NNS is not yet deployed")
return nil, fmt.Errorf("get nns contract: %w", err)
}
items = append(items,
c.Contracts[netmapContract].Hash,
@ -605,7 +605,7 @@ func (c *initializeContext) getNetConfigFromNetmapContract() ([]stackitem.Item,
r := management.NewReader(c.ReadOnlyInvoker)
cs, err := r.GetContractByID(1)
if err != nil {
return nil, fmt.Errorf("NNS is not yet deployed: %w", err)
return nil, fmt.Errorf("get nns contract: %w", err)
}
nmHash, err := nnsResolveHash(c.ReadOnlyInvoker, cs.Hash, domainOf(netmapContract))
if err != nil {