Currently the "path" module does two very different things:
* Defines how ipfs paths look like and provides tools to parse/split etc.
* Provides a resolver to resolve paths.
This moves the resolver stuff to `path/resolver` and leaves the
path utilities in `path`.
The result is that now the IPFS `path` package just defines what a path
looks like and becomes a module that can be exported/re-used without problems.
Currently there are circular dependency cycles (resolve_test -> merkledag/utils,
merkledag->path), which the prevent the export of merkledag itself.
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
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>
Note: This commit is technically broken. However, I need to make a bunch of
cmds changes to make this work and I'd rather not bundle both changes into a
single commit.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
(segfault)
Also, buffer the response channel. I believe we had a go routine leak here
before.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
* Change ResolveToCid to take a Resolver and a NameSystem instead of an ipfs
Node.
* Make the pin/unpin methods use a Unixfs path resolver.
Closes: #3974
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This change adds the /ipfs/bitswap/1.1.0 protocol. The new protocol
adds a 'payload' field to the protobuf message and deprecates the
existing 'blocks' field. The 'payload' field is an array of pairs of cid
prefixes and block data. The cid prefixes are used to ensure the correct
codecs and hash functions are used to handle the block on the receiving
end.
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
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>
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>