@cryptotaxi247 / kubo / commits / 71d2ab1fc

use already created config in daemon.go

License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>

Jeromy committed Sep 3, 2015 at 12:07 UTC 71d2ab1fc9f5bcb14768f74f5cc1bde6be42d187
2 files changed +15 -7
cmd/ipfs/daemon.go
+1 -7
@@ -204,13 +204,7 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
204 return
205 }
206 if routingOption == routingOptionSupernodeKwd {
207 - rcfg, err := repo.Config()
208 - if err != nil {
209 - res.SetError(err, cmds.ErrNormal)
210 - return
211 - }
212 -
213 - servers, err := rcfg.SupernodeRouting.ServerIPFSAddrs()
207 + servers, err := cfg.SupernodeRouting.ServerIPFSAddrs()
208 if err != nil {
209 res.SetError(err, cmds.ErrNormal)
210 repo.Close() // because ownership hasn't been transferred to the node
util/sadhack/godep.go new
+14
@@ -0,0 +1,14 @@
1 +package util
2 +
3 +// FIXME: we need the go-random/random utility for our sharness test wich depends on go-humanize
4 +// Godep will drop it if we dont use it in ipfs. There should be a better way to do this.
5 +import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/dustin/go-humanize"
6 +
7 +// similar to the above, only used in the tests makefile
8 +import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/whyrusleeping/iptb"
9 +
10 +import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/chriscool/go-sleep"
11 +
12 +// imported by chegga/pb on windows, this is here so running godeps on non-windows doesnt
13 +// drop it from our vendoring
14 +import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/olekukonko/ts"