Commit a9df187e authored by Jeromy Johnson's avatar Jeromy Johnson Committed by GitHub

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

merkledag: optimize DagService GetLinks for Raw Nodes.
parents 1ca2d428 bfe7ad7e
......@@ -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 is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment