forked from TrueCloudLab/frostfs-node
[#48] Make IR initial config errors more readable
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
be353ad69f
commit
2fc2f8792e
1 changed files with 3 additions and 3 deletions
|
@ -221,7 +221,7 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
|
|||
|
||||
err = initConfigFromBlockchain(server, contracts, &key.PublicKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errors.Wrap(err, "initializing error")
|
||||
}
|
||||
|
||||
return server, nil
|
||||
|
@ -304,13 +304,13 @@ func initConfigFromBlockchain(s *Server, c *contracts, key *ecdsa.PublicKey) err
|
|||
// get current epoch
|
||||
epoch, err := invoke.Epoch(s.morphClient, c.netmap)
|
||||
if err != nil {
|
||||
return err
|
||||
return errors.Wrap(err, "can't read epoch")
|
||||
}
|
||||
|
||||
// check if node inside inner ring list
|
||||
state, err := invoke.IsInnerRing(s.mainnetClient, c.neofs, key)
|
||||
if err != nil {
|
||||
return err
|
||||
return errors.Wrap(err, "can't read inner ring list")
|
||||
}
|
||||
|
||||
s.epochCounter.Store(uint64(epoch))
|
||||
|
|
Loading…
Reference in a new issue