提交 d60f7fdf 作者: Jeromy Johnson

Merge pull request #2577 from pfista/2527-local-resolve

ipfs name resolve --local fixed multihash error
......@@ -2,6 +2,7 @@ package namesys
import (
"fmt"
"strings"
"time"
lru "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/hashicorp/golang-lru"
......@@ -122,6 +123,7 @@ func (r *routingResolver) resolveOnce(ctx context.Context, name string) (path.Pa
return cached, nil
}
name = strings.TrimPrefix(name, "/ipns/")
hash, err := mh.FromB58String(name)
if err != nil {
// name should be a multihash. if it isn't, error out here.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论