提交 71d2ab1f 作者: Jeromy

use already created config in daemon.go

License: MIT
Signed-off-by: 's avatarJeromy <jeromyj@gmail.com>
上级 ab0c668a
......@@ -204,13 +204,7 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
return
}
if routingOption == routingOptionSupernodeKwd {
rcfg, err := repo.Config()
if err != nil {
res.SetError(err, cmds.ErrNormal)
return
}
servers, err := rcfg.SupernodeRouting.ServerIPFSAddrs()
servers, err := cfg.SupernodeRouting.ServerIPFSAddrs()
if err != nil {
res.SetError(err, cmds.ErrNormal)
repo.Close() // because ownership hasn't been transferred to the node
......
package util
// FIXME: we need the go-random/random utility for our sharness test wich depends on go-humanize
// Godep will drop it if we dont use it in ipfs. There should be a better way to do this.
import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/dustin/go-humanize"
// similar to the above, only used in the tests makefile
import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/whyrusleeping/iptb"
import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/chriscool/go-sleep"
// imported by chegga/pb on windows, this is here so running godeps on non-windows doesnt
// drop it from our vendoring
import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/olekukonko/ts"
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论