提交 686dcdd9 作者: Kevin Atkinson

Build fixes.

License: MIT
Signed-off-by: 's avatarKevin Atkinson <k@kevina.org>
上级 2c3ed7ef
......@@ -414,7 +414,7 @@ func serveHTTPApi(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, error
apiAddr, _ := req.Options[commands.ApiOption].(string)
if apiAddr == "" {
apiAddr = cfg.Addresses.API
apiAddr = cfg.Addresses.API[0]
}
apiMaddr, err := ma.NewMultiaddr(apiAddr)
if err != nil {
......@@ -512,7 +512,7 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
return nil, fmt.Errorf("serveHTTPGateway: GetConfig() failed: %s", err)
}
gatewayMaddr, err := ma.NewMultiaddr(cfg.Addresses.Gateway)
gatewayMaddr, err := ma.NewMultiaddr(cfg.Addresses.Gateway[0])
if err != nil {
return nil, fmt.Errorf("serveHTTPGateway: invalid gateway address: %q (err: %s)", cfg.Addresses.Gateway, err)
}
......
......@@ -14,7 +14,6 @@ import (
"gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
cmds "gx/ipfs/QmXTmUCBtDUrzDYVzASogLiNph7EBuYqEgPL7QoHNMzUnz/go-ipfs-cmds"
offline "gx/ipfs/QmYKPBQpSSWwmgNTvVE3vQdPoeqxwudPQnXJ4hU383RsSA/go-ipfs-routing/offline"
logging "gx/ipfs/QmZChCsSt8DctjceaL56Eibc29CVQq4dGKRXC5JRZ6Ppae/go-log"
path "gx/ipfs/QmbE9gr6c2FomTgc2pRZRTooHpchJ1uaZKremypyWJMV4t/go-path"
)
......
......@@ -13,7 +13,6 @@ import (
"gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit"
cmds "gx/ipfs/QmXTmUCBtDUrzDYVzASogLiNph7EBuYqEgPL7QoHNMzUnz/go-ipfs-cmds"
path "gx/ipfs/QmbE9gr6c2FomTgc2pRZRTooHpchJ1uaZKremypyWJMV4t/go-path"
)
var (
......
......@@ -524,13 +524,15 @@ func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, host p2phost
)
n.Routing = rhelpers.Tiered{
// Always check pubsub first.
&rhelpers.Compose{
ValueStore: &rhelpers.LimitedValueStore{
ValueStore: n.PSRouter,
Namespaces: []string{"ipns"},
Routers: []routing.IpfsRouting{
&rhelpers.Compose{
ValueStore: &rhelpers.LimitedValueStore{
ValueStore: n.PSRouter,
Namespaces: []string{"ipns"},
},
},
n.Routing,
},
n.Routing,
}
}
......
......@@ -21,7 +21,7 @@ func TestInitialization(t *testing.T) {
Identity: id,
Addresses: config.Addresses{
Swarm: []string{"/ip4/0.0.0.0/tcp/4001"},
API: "/ip4/127.0.0.1/tcp/8000",
API: []string{"/ip4/127.0.0.1/tcp/8000"},
},
},
......@@ -29,7 +29,7 @@ func TestInitialization(t *testing.T) {
Identity: id,
Addresses: config.Addresses{
Swarm: []string{"/ip4/0.0.0.0/tcp/4001"},
API: "/ip4/127.0.0.1/tcp/8000",
API: []string{"/ip4/127.0.0.1/tcp/8000"},
},
},
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论