mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 21:37:57 +08:00
Merge pull request #3351 from ipfs/kevina/raw-get-link-opt
merkledag: optimize DagService GetLinks for Raw Nodes.
This commit is contained in:
commit
a9df187e56
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user