Skip to content

local downloads can trigger block exchange engine #29

@markspanbroek

Description

@markspanbroek

When downloading something from api/v1/data/{cid} (which signals a local only download), the node may still invoke the block exchange engine to get parts of the dataset.

This happens when the manifest is in the local store, but some of the dataset blocks are not.
Node.retrieve() will first check whether a (manifest) cid is in the store:

if local and not await (cid in self.networkStore):

And if it is, it will use Node.streamEntireDataset(), which will go to the network if the blocks are not local:

await self.streamEntireDataset(manifest, cid)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions