提交 a9df187e 作者: Jeromy Johnson 提交者: GitHub

Merge pull request #3351 from ipfs/kevina/raw-get-link-opt

merkledag: optimize DagService GetLinks for Raw Nodes.
......@@ -114,6 +114,9 @@ func decodeBlock(b blocks.Block) (node.Node, error) {
}
func (n *dagService) GetLinks(ctx context.Context, c *cid.Cid) ([]*node.Link, error) {
if c.Type() == cid.Raw {
return nil, nil
}
node, err := n.Get(ctx, c)
if err != nil {
return nil, err
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论