1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-26 04:26:07 +08:00

merkledag: switch to new dag interface

Also:

* Update the blockstore/blockservice methods to match.
* Construct a new temporary offline dag instead of having a
  GetOfflineLinkService method.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen
2018-01-25 12:21:51 -08:00
parent 730754d9d2
commit d154b4a990
68 changed files with 496 additions and 658 deletions

View File

@ -7,7 +7,6 @@ import (
"io"
"path"
mdag "github.com/ipfs/go-ipfs/merkledag"
tar "github.com/ipfs/go-ipfs/unixfs/archive/tar"
uio "github.com/ipfs/go-ipfs/unixfs/io"
@ -31,7 +30,7 @@ func (i *identityWriteCloser) Close() error {
}
// DagArchive is equivalent to `ipfs getdag $hash | maybe_tar | maybe_gzip`
func DagArchive(ctx context.Context, nd node.Node, name string, dag mdag.DAGService, archive bool, compression int) (io.Reader, error) {
func DagArchive(ctx context.Context, nd node.Node, name string, dag node.DAGService, archive bool, compression int) (io.Reader, error) {
_, filename := path.Split(name)