提交 3ae37b29 作者: Matt Bell

core: Show error when config identity is not set

上级 b63e10f3
......@@ -118,6 +118,10 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) {
}
func initIdentity(cfg *config.Config) (*peer.Peer, error) {
if cfg.Identity == nil {
return nil, errors.New("Identity was not set in config (was ipfs init run?)")
}
if len(cfg.Identity.PeerID) == 0 {
return nil, errors.New("No peer ID in config! (was ipfs init run?)")
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论