From 41a30d6ec298d8f2dc5dc53a487d872b55282ba7 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 4 Jun 2021 14:02:22 +0300 Subject: [PATCH] [#562] config/node: fallback to wallet if raw key is invalid Signed-off-by: Evgenii Stratonikov --- cmd/neofs-node/config.go | 2 +- cmd/neofs-node/config/node/config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/neofs-node/config.go b/cmd/neofs-node/config.go index b721ddbc..179a1104 100644 --- a/cmd/neofs-node/config.go +++ b/cmd/neofs-node/config.go @@ -208,7 +208,7 @@ func initCfg(path string) *cfg { config.WithConfigFile(path), ) - key := nodeconfig.Wallet(appCfg) + key := nodeconfig.Key(appCfg) var logPrm logger.Prm diff --git a/cmd/neofs-node/config/node/config.go b/cmd/neofs-node/config/node/config.go index 1883ce1c..d794ba02 100644 --- a/cmd/neofs-node/config/node/config.go +++ b/cmd/neofs-node/config/node/config.go @@ -43,7 +43,7 @@ func Key(c *config.Config) *keys.PrivateKey { } if err != nil { - panic(fmt.Errorf("can't read key: %w", err)) + return Wallet(c) } return key