From 71d2ab1fc9f5bcb14768f74f5cc1bde6be42d187 Mon Sep 17 00:00:00 2001 From: Jeromy Date: Thu, 3 Sep 2015 12:07:07 -0700 Subject: [PATCH] use already created config in daemon.go License: MIT Signed-off-by: Jeromy --- cmd/ipfs/daemon.go | 8 +------- util/sadhack/godep.go | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 util/sadhack/godep.go diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index 5f5765bb0..92956b1d3 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -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 diff --git a/util/sadhack/godep.go b/util/sadhack/godep.go new file mode 100644 index 000000000..0ee9cf748 --- /dev/null +++ b/util/sadhack/godep.go @@ -0,0 +1,14 @@ +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"