@cryptotaxi247 / kubo / commits / 686dcdd9a

Build fixes.

License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>

Kevin Atkinson committed Oct 4, 2018 at 01:25 UTC 686dcdd9a4d6103fe011df8715274285f22076e0
5 files changed +11 -11
cmd/ipfs/daemon.go
+2 -2
@@ -414,7 +414,7 @@ func serveHTTPApi(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, error
414
415 apiAddr, _ := req.Options[commands.ApiOption].(string)
416 if apiAddr == "" {
417 - apiAddr = cfg.Addresses.API
417 + apiAddr = cfg.Addresses.API[0]
418 }
419 apiMaddr, err := ma.NewMultiaddr(apiAddr)
420 if err != nil {
@@ -512,7 +512,7 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
512 return nil, fmt.Errorf("serveHTTPGateway: GetConfig() failed: %s", err)
513 }
514
515 - gatewayMaddr, err := ma.NewMultiaddr(cfg.Addresses.Gateway)
515 + gatewayMaddr, err := ma.NewMultiaddr(cfg.Addresses.Gateway[0])
516 if err != nil {
517 return nil, fmt.Errorf("serveHTTPGateway: invalid gateway address: %q (err: %s)", cfg.Addresses.Gateway, err)
518 }
core/commands/name/ipns.go
-1
@@ -14,7 +14,6 @@ import (
14
15 "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
16 cmds "gx/ipfs/QmXTmUCBtDUrzDYVzASogLiNph7EBuYqEgPL7QoHNMzUnz/go-ipfs-cmds"
17 - offline "gx/ipfs/QmYKPBQpSSWwmgNTvVE3vQdPoeqxwudPQnXJ4hU383RsSA/go-ipfs-routing/offline"
17 logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log"
18 path "gx/ipfs/QmbE9gr6c2FomTgc2pRZRTooHpchJ1uaZKremypyWJMV4t/go-path"
19 )
core/commands/name/publish.go
-1
@@ -13,7 +13,6 @@ import (
13
14 "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
15 cmds "gx/ipfs/QmXTmUCBtDUrzDYVzASogLiNph7EBuYqEgPL7QoHNMzUnz/go-ipfs-cmds"
16 - path "gx/ipfs/QmbE9gr6c2FomTgc2pRZRTooHpchJ1uaZKremypyWJMV4t/go-path"
16 )
17
18 var (
core/core.go
+7 -5
@@ -524,13 +524,15 @@ func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, host p2phost
524 )
525 n.Routing = rhelpers.Tiered{
526 // Always check pubsub first.
527 - &rhelpers.Compose{
528 - ValueStore: &rhelpers.LimitedValueStore{
529 - ValueStore: n.PSRouter,
530 - Namespaces: []string{"ipns"},
527 + Routers: []routing.IpfsRouting{
528 + &rhelpers.Compose{
529 + ValueStore: &rhelpers.LimitedValueStore{
530 + ValueStore: n.PSRouter,
531 + Namespaces: []string{"ipns"},
532 + },
533 },
534 + n.Routing,
535 },
533 - n.Routing,
536 }
537 }
538
core/core_test.go
+2 -2
@@ -21,7 +21,7 @@ func TestInitialization(t *testing.T) {
21 Identity: id,
22 Addresses: config.Addresses{
23 Swarm: []string{"/ip4/0.0.0.0/tcp/4001"},
24 - API: "/ip4/127.0.0.1/tcp/8000",
24 + API: []string{"/ip4/127.0.0.1/tcp/8000"},
25 },
26 },
27
@@ -29,7 +29,7 @@ func TestInitialization(t *testing.T) {
29 Identity: id,
30 Addresses: config.Addresses{
31 Swarm: []string{"/ip4/0.0.0.0/tcp/4001"},
32 - API: "/ip4/127.0.0.1/tcp/8000",
32 + API: []string{"/ip4/127.0.0.1/tcp/8000"},
33 },
34 },
35 }