forked from TrueCloudLab/frostfs-node
[#562] config/node: fallback to wallet if raw key is invalid
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
2f020a500d
commit
41a30d6ec2
2 changed files with 2 additions and 2 deletions
|
@ -208,7 +208,7 @@ func initCfg(path string) *cfg {
|
||||||
config.WithConfigFile(path),
|
config.WithConfigFile(path),
|
||||||
)
|
)
|
||||||
|
|
||||||
key := nodeconfig.Wallet(appCfg)
|
key := nodeconfig.Key(appCfg)
|
||||||
|
|
||||||
var logPrm logger.Prm
|
var logPrm logger.Prm
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ func Key(c *config.Config) *keys.PrivateKey {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Errorf("can't read key: %w", err))
|
return Wallet(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
return key
|
return key
|
||||||
|
|
Loading…
Reference in a new issue