Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DAGService.GetLinks() method and use it in the GC and elsewhere. #3255

Merged
merged 3 commits into from
Oct 8, 2016

Commits on Oct 6, 2016

  1. Add DAGService.GetLinks() method and use it in the GC and elsewhere.

    This method will use the (also new) LinkService if it is available to
    retrieving just the links for a MerkleDAG without necessary having to
    retrieve the underlying block.
    
    For now the main benefit is that the pinner will not break when a block
    becomes invalid due to a change in the backing file.  This is possible
    because the metadata for a block (that includes the Links) is stored
    separately and thus always available even if the backing file changes.
    
    License: MIT
    Signed-off-by: Kevin Atkinson <k@kevina.org>
    kevina committed Oct 6, 2016
    Configuration menu
    Copy the full SHA
    3899194 View commit details
    Browse the repository at this point in the history
  2. Don't use a separate LinkService for DAGService.GetLinks()

    Instead make LinkService a part of DAGService.  The LinkService is now
    simply an interface that DAGService implements.  Also provide a
    GetOfflineLinkService() method that the GC uses to get an offline
    instance.
    
    License: MIT
    Signed-off-by: Kevin Atkinson <k@kevina.org>
    kevina committed Oct 6, 2016
    Configuration menu
    Copy the full SHA
    721df36 View commit details
    Browse the repository at this point in the history
  3. Fix EnumerateChildren & hasChild to take a *cid.Cid instead of []*mda…

    …g.Link
    
    Author: Kevin Atkinson <k@kevina.org>
    
    Fix EnumerateChildren & hasChild to take a *cid.Cid instead of []*mdag.Link
    
    Author: Jeromy Johnson <why@ipfs.io>
    
    make FetchGraph use a cid
    
    pin: fix TestPinRecursiveFail
    
    License: MIT
    Signed-off-by: Jeromy <why@ipfs.io>
    
    License: MIT
    Signed-off-by: Kevin Atkinson <k@kevina.org>
    kevina committed Oct 6, 2016
    Configuration menu
    Copy the full SHA
    772164c View commit details
    Browse the repository at this point in the history