mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-28 00:39:31 +08:00
Merge branch 'master' of https://github.com/ipfs/go-ipfs into patch-3
This commit is contained in:
@ -1 +1 @@
|
||||
0.4.9: QmQuvzi7p2qv9oduQ8o6fhPXDBCns9ryjjxqumyNvE5gZs
|
||||
0.4.10: QmXmrMgvGsobiWUEfvtS87oeQwRviCp2g9JD6uKea3Fo5m
|
||||
|
@ -10,7 +10,7 @@ os:
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.7
|
||||
- 1.8
|
||||
|
||||
env:
|
||||
- TEST_NO_FUSE=1 TEST_VERBOSE=1 TEST_SUITE=test_go_expensive
|
||||
|
74
CHANGELOG.md
74
CHANGELOG.md
@ -1,5 +1,79 @@
|
||||
# go-ipfs changelog
|
||||
|
||||
### 0.4.10 - 2017-06-27
|
||||
|
||||
Ipfs 0.4.10 is a patch release that contains several exciting new features,
|
||||
bugfixes and general improvements. Including new commands, easier corruption
|
||||
recovery, and a generally cleaner codebase.
|
||||
|
||||
The `ipfs pin` command has two new subcommands, `verify` and `update`. `ipfs
|
||||
pin verify` is used to scan the repo for pinned object graphs and check their
|
||||
integrity. Any issues are reported back with helpful error text to make error
|
||||
recovery simpler. This subcommand was added to help recover from datastore
|
||||
corruptions, particularly if using the experimental filestore and accidentally
|
||||
deleting tracked files.
|
||||
`ipfs pin update` was added to make the task of keeping a large, frequently
|
||||
changing object graph pinned. Previously users had to call `ipfs pin rm` on the
|
||||
old pin, and `ipfs pin add` on the new one. The 'new' `ipfs pin add` call would
|
||||
be very expensive as it would need to verify the entirety of the graph again.
|
||||
The `ipfs pin update` command takes shortcuts, portions of the graph that were
|
||||
covered under the old pin are assumed to be fine, and the command skips
|
||||
checking them.
|
||||
|
||||
Next up, we have finally implemented an `ipfs shutdown` command so users can
|
||||
shut down their ipfs daemons via the API. This is especially useful on
|
||||
platforms that make it difficult to control processes (Android, for example),
|
||||
and is also useful when needing to shut down a node remotely and you do not
|
||||
have access to the machine itself.
|
||||
|
||||
`ipfs add` has gained a new flag; the `--hash` flag allows you to select which
|
||||
hash function to use and we have given it the ability to select `blake2b-256`.
|
||||
This pushes us one step closer to shifting over to using blake2b as the
|
||||
default. Blake2b is significantly faster than sha2-256, and also is conjectured
|
||||
to provide superior security.
|
||||
|
||||
We have also finally implemented a very early (and experimental) `ipfs p2p`.
|
||||
This command and its subcommands will allow you to open up arbitrary streams to
|
||||
other ipfs peers through libp2p. The interfaces are a little bit clunky right
|
||||
now, but shouldn't get in the way of anyone wanting to try building a fully
|
||||
peer to peer application on top of ipfs and libp2p. For more info on this
|
||||
command, to ask questions, or to provide feedback, head over to the [feedback
|
||||
issue](https://github.com/ipfs/go-ipfs/issues/3994) for the command.
|
||||
|
||||
A few other subcommands and flags were added around the API, as well as many
|
||||
other requested improvements. See below for the full list of changes.
|
||||
|
||||
|
||||
- Features
|
||||
- Add support for specifying the hash function in `ipfs add` ([ipfs/go-ipfs#3919](https://github.com/ipfs/go-ipfs/pull/3919))
|
||||
- Implement `ipfs key {rm, rename}` ([ipfs/go-ipfs#3892](https://github.com/ipfs/go-ipfs/pull/3892))
|
||||
- Implement `ipfs shutdown` command ([ipfs/go-ipfs#3884](https://github.com/ipfs/go-ipfs/pull/3884))
|
||||
- Implement `ipfs pin update` ([ipfs/go-ipfs#3846](https://github.com/ipfs/go-ipfs/pull/3846))
|
||||
- Implement `ipfs pin verify` ([ipfs/go-ipfs#3843](https://github.com/ipfs/go-ipfs/pull/3843))
|
||||
- Implemented experimental p2p commands ([ipfs/go-ipfs#3943](https://github.com/ipfs/go-ipfs/pull/3943))
|
||||
- Improvements
|
||||
- Add MaxStorage field to output of "repo stat" ([ipfs/go-ipfs#3915](https://github.com/ipfs/go-ipfs/pull/3915))
|
||||
- Add Suborigin header to gateway responses ([ipfs/go-ipfs#3914](https://github.com/ipfs/go-ipfs/pull/3914))
|
||||
- Add "--file-order" option to "filestore ls" and "verify" ([ipfs/go-ipfs#3938](https://github.com/ipfs/go-ipfs/pull/3938))
|
||||
- Allow selecting ipns keys by Peer ID ([ipfs/go-ipfs#3882](https://github.com/ipfs/go-ipfs/pull/3882))
|
||||
- Don't redirect to trailing slash in gateway for `go get` ([ipfs/go-ipfs#3963](https://github.com/ipfs/go-ipfs/pull/3963))
|
||||
- Add 'ipfs dht findprovs --num-providers' to allow choosing number of providers to find ([ipfs/go-ipfs#3966](https://github.com/ipfs/go-ipfs/pull/3966))
|
||||
- Make sure all keystore keys get republished ([ipfs/go-ipfs#3951](https://github.com/ipfs/go-ipfs/pull/3951))
|
||||
- Documentation
|
||||
- Adding documentation on PubSub encodedings ([ipfs/go-ipfs#3909](https://github.com/ipfs/go-ipfs/pull/3909))
|
||||
- Change 'neccessary' to 'necessary' ([ipfs/go-ipfs#3941](https://github.com/ipfs/go-ipfs/pull/3941))
|
||||
- README.md: add Nix to the linux package managers ([ipfs/go-ipfs#3939](https://github.com/ipfs/go-ipfs/pull/3939))
|
||||
- More verbose errors in filestore ([ipfs/go-ipfs#3964](https://github.com/ipfs/go-ipfs/pull/3964))
|
||||
- Bugfixes
|
||||
- Fix typo in message when file size check fails ([ipfs/go-ipfs#3895](https://github.com/ipfs/go-ipfs/pull/3895))
|
||||
- Clean up bitswap ledgers when disconnecting ([ipfs/go-ipfs#3437](https://github.com/ipfs/go-ipfs/pull/3437))
|
||||
- Make odds of 'process added after close' panic less likely ([ipfs/go-ipfs#3940](https://github.com/ipfs/go-ipfs/pull/3940))
|
||||
- General Changes and Refactorings
|
||||
- Remove 'ipfs diag net' from codebase ([ipfs/go-ipfs#3916](https://github.com/ipfs/go-ipfs/pull/3916))
|
||||
- Update to dht code with provide announce option ([ipfs/go-ipfs#3928](https://github.com/ipfs/go-ipfs/pull/3928))
|
||||
- Apply the megacheck code vetting tool ([ipfs/go-ipfs#3949](https://github.com/ipfs/go-ipfs/pull/3949))
|
||||
- Expose port 8081 in docker container for /ws listener ([ipfs/go-ipfs#3954](https://github.com/ipfs/go-ipfs/pull/3954))
|
||||
|
||||
### 0.4.9 - 2017-04-30
|
||||
|
||||
Ipfs 0.4.9 is a maintenance release that contains several useful bugfixes and
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
"github.com/ipfs/go-ipfs/core"
|
||||
"github.com/ipfs/go-ipfs/core/coreunix"
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
|
||||
// this import keeps gx from thinking the dep isn't used
|
||||
_ "gx/ipfs/QmQfeKxQtBN721pekQh6Jq24adFUjnU65YdY3GNczfuG2T/dir-index-html"
|
||||
|
@ -1,82 +0,0 @@
|
||||
// Package blocks contains the lowest level of IPFS data structures.
|
||||
// A block is raw data accompanied by a CID. The CID contains the multihash
|
||||
// corresponding to the block.
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
mh "gx/ipfs/QmVGtdTZdTFaLsaj2RwdVG8jcjNNcp1DE914DKZ2kHmXHw/go-multihash"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
)
|
||||
|
||||
// ErrWrongHash is returned when the Cid of a block is not the expected
|
||||
// according to the contents. It is currently used only when debugging.
|
||||
var ErrWrongHash = errors.New("data did not match given hash")
|
||||
|
||||
// Block provides abstraction for blocks implementations.
|
||||
type Block interface {
|
||||
RawData() []byte
|
||||
Cid() *cid.Cid
|
||||
String() string
|
||||
Loggable() map[string]interface{}
|
||||
}
|
||||
|
||||
// A BasicBlock is a singular block of data in ipfs. It implements the Block
|
||||
// interface.
|
||||
type BasicBlock struct {
|
||||
cid *cid.Cid
|
||||
data []byte
|
||||
}
|
||||
|
||||
// NewBlock creates a Block object from opaque data. It will hash the data.
|
||||
func NewBlock(data []byte) *BasicBlock {
|
||||
// TODO: fix assumptions
|
||||
return &BasicBlock{data: data, cid: cid.NewCidV0(u.Hash(data))}
|
||||
}
|
||||
|
||||
// NewBlockWithCid creates a new block when the hash of the data
|
||||
// is already known, this is used to save time in situations where
|
||||
// we are able to be confident that the data is correct.
|
||||
func NewBlockWithCid(data []byte, c *cid.Cid) (*BasicBlock, error) {
|
||||
if u.Debug {
|
||||
chkc, err := c.Prefix().Sum(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if !chkc.Equals(c) {
|
||||
return nil, ErrWrongHash
|
||||
}
|
||||
}
|
||||
return &BasicBlock{data: data, cid: c}, nil
|
||||
}
|
||||
|
||||
// Multihash returns the hash contained in the block CID.
|
||||
func (b *BasicBlock) Multihash() mh.Multihash {
|
||||
return b.cid.Hash()
|
||||
}
|
||||
|
||||
// RawData returns the block raw contents as a byte slice.
|
||||
func (b *BasicBlock) RawData() []byte {
|
||||
return b.data
|
||||
}
|
||||
|
||||
// Cid returns the content identifier of the block.
|
||||
func (b *BasicBlock) Cid() *cid.Cid {
|
||||
return b.cid
|
||||
}
|
||||
|
||||
// String provides a human-readable representation of the block CID.
|
||||
func (b *BasicBlock) String() string {
|
||||
return fmt.Sprintf("[Block %s]", b.Cid())
|
||||
}
|
||||
|
||||
// Loggable returns a go-log loggable item.
|
||||
func (b *BasicBlock) Loggable() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"block": b.Cid().String(),
|
||||
}
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
mh "gx/ipfs/QmVGtdTZdTFaLsaj2RwdVG8jcjNNcp1DE914DKZ2kHmXHw/go-multihash"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
)
|
||||
|
||||
func TestBlocksBasic(t *testing.T) {
|
||||
|
||||
// Test empty data
|
||||
empty := []byte{}
|
||||
NewBlock(empty)
|
||||
|
||||
// Test nil case
|
||||
NewBlock(nil)
|
||||
|
||||
// Test some data
|
||||
NewBlock([]byte("Hello world!"))
|
||||
}
|
||||
|
||||
func TestData(t *testing.T) {
|
||||
data := []byte("some data")
|
||||
block := NewBlock(data)
|
||||
|
||||
if !bytes.Equal(block.RawData(), data) {
|
||||
t.Error("data is wrong")
|
||||
}
|
||||
}
|
||||
|
||||
func TestHash(t *testing.T) {
|
||||
data := []byte("some other data")
|
||||
block := NewBlock(data)
|
||||
|
||||
hash, err := mh.Sum(data, mh.SHA2_256, -1)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if !bytes.Equal(block.Multihash(), hash) {
|
||||
t.Error("wrong multihash")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCid(t *testing.T) {
|
||||
data := []byte("yet another data")
|
||||
block := NewBlock(data)
|
||||
c := block.Cid()
|
||||
|
||||
if !bytes.Equal(block.Multihash(), c.Hash()) {
|
||||
t.Error("key contains wrong data")
|
||||
}
|
||||
}
|
||||
|
||||
func TestManualHash(t *testing.T) {
|
||||
oldDebugState := u.Debug
|
||||
defer (func() {
|
||||
u.Debug = oldDebugState
|
||||
})()
|
||||
|
||||
data := []byte("I can't figure out more names .. data")
|
||||
hash, err := mh.Sum(data, mh.SHA2_256, -1)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
c := cid.NewCidV0(hash)
|
||||
|
||||
u.Debug = false
|
||||
block, err := NewBlockWithCid(data, c)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if !bytes.Equal(block.Multihash(), hash) {
|
||||
t.Error("wrong multihash")
|
||||
}
|
||||
|
||||
data[5] = byte((uint32(data[5]) + 5) % 256) // Transfrom hash to be different
|
||||
block, err = NewBlockWithCid(data, c)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if !bytes.Equal(block.Multihash(), hash) {
|
||||
t.Error("wrong multihash")
|
||||
}
|
||||
|
||||
u.Debug = true
|
||||
|
||||
_, err = NewBlockWithCid(data, c)
|
||||
if err != ErrWrongHash {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
@ -3,12 +3,12 @@ package blockstore
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/ipfs/go-ipfs/blocks"
|
||||
"gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
"gx/ipfs/QmRg1gKTHzc3CZXSKzem8aR4E3TubFhbgXwfVuWnSK5CC5/go-metrics-interface"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
lru "gx/ipfs/QmVYxfoJQiZijTgPNHCHgHELvQpbsJNTg6Crmc3dQkj3yy/golang-lru"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// arccache wraps a BlockStore with an Adaptive Replacement Cache (ARC) for
|
||||
|
@ -4,11 +4,11 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/ipfs/go-ipfs/blocks"
|
||||
"gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
syncds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
syncds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
var exampleBlock = blocks.NewBlock([]byte("foo"))
|
||||
|
@ -8,14 +8,14 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
dshelp "github.com/ipfs/go-ipfs/thirdparty/ds-help"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dsns "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/namespace"
|
||||
dsq "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/query"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dsns "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/namespace"
|
||||
dsq "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/query"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
var log = logging.Logger("blockstore")
|
||||
@ -193,8 +193,6 @@ func (bs *blockstore) AllKeysChan(ctx context.Context) (<-chan *cid.Cid, error)
|
||||
|
||||
// KeysOnly, because that would be _a lot_ of data.
|
||||
q := dsq.Query{KeysOnly: true}
|
||||
// datastore/namespace does *NOT* fix up Query.Prefix
|
||||
q.Prefix = BlockPrefix.String()
|
||||
res, err := bs.datastore.Query(q)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -6,14 +6,14 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
dshelp "github.com/ipfs/go-ipfs/thirdparty/ds-help"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dsq "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/query"
|
||||
ds_sync "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dsq "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/query"
|
||||
ds_sync "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func TestGetWhenKeyNotPresent(t *testing.T) {
|
||||
|
@ -5,10 +5,10 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/go-ipfs/blocks"
|
||||
"gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
"gx/ipfs/QmRg1gKTHzc3CZXSKzem8aR4E3TubFhbgXwfVuWnSK5CC5/go-metrics-interface"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
bloom "gx/ipfs/QmeiMCBkYHxkDkDfnDadzz4YxY5ruL5Pj499essE4vRsGM/bbloom"
|
||||
)
|
||||
|
||||
|
@ -6,12 +6,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/go-ipfs/blocks"
|
||||
"gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
context "context"
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dsq "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/query"
|
||||
syncds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dsq "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/query"
|
||||
syncds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
)
|
||||
|
||||
func testBloomCached(ctx context.Context, bs Blockstore) (*bloomcache, error) {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
|
||||
bs "github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
"github.com/ipfs/go-ipfs/pin"
|
||||
|
@ -2,7 +2,7 @@
|
||||
// with Blocks.
|
||||
package blocksutil
|
||||
|
||||
import "github.com/ipfs/go-ipfs/blocks"
|
||||
import "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
// NewBlockGenerator returns an object capable of
|
||||
// producing blocks.
|
||||
|
@ -4,7 +4,7 @@
|
||||
package set
|
||||
|
||||
import (
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
|
||||
"github.com/ipfs/go-ipfs/blocks/bloom"
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
bu "github.com/ipfs/go-ipfs/blocks/blocksutil"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -8,12 +8,12 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
"github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
exchange "github.com/ipfs/go-ipfs/exchange"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
var log = logging.Logger("blockservice")
|
||||
|
@ -3,13 +3,13 @@ package blockservice
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/ipfs/go-ipfs/blocks"
|
||||
"github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
butil "github.com/ipfs/go-ipfs/blocks/blocksutil"
|
||||
offline "github.com/ipfs/go-ipfs/exchange/offline"
|
||||
"gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dssync "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dssync "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
)
|
||||
|
||||
func TestWriteThroughWorks(t *testing.T) {
|
||||
|
@ -7,15 +7,15 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
blockstore "github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
. "github.com/ipfs/go-ipfs/blockservice"
|
||||
offline "github.com/ipfs/go-ipfs/exchange/offline"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dssync "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dssync "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func newObject(data []byte) blocks.Block {
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM golang:1.7
|
||||
FROM golang:1.8
|
||||
MAINTAINER Jakub Sztandera <kubuxu@ipfs.io>
|
||||
|
||||
|
||||
|
@ -12,8 +12,8 @@ machine:
|
||||
|
||||
post:
|
||||
- sudo rm -rf /usr/local/go
|
||||
- if [ ! -e go1.7.linux-amd64.tar.gz ]; then curl -o go1.7.linux-amd64.tar.gz https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz; fi
|
||||
- sudo tar -C /usr/local -xzf go1.7.linux-amd64.tar.gz
|
||||
- if [ ! -e go1.8.3.linux-amd64.tar.gz ]; then curl -o go1.8.3.linux-amd64.tar.gz https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz; fi
|
||||
- sudo tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz
|
||||
|
||||
services:
|
||||
- docker
|
||||
@ -30,7 +30,7 @@ dependencies:
|
||||
- cd "$HOME/.go_workspace/src/$IMPORT_PATH" && make deps
|
||||
|
||||
cache_directories:
|
||||
- ~/go1.7.linux-amd64.tar.gz
|
||||
- ~/go1.8.3.linux-amd64.tar.gz
|
||||
- "$HOME/.go_workspace/src/gx/ipfs"
|
||||
|
||||
test:
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
context "context"
|
||||
assets "github.com/ipfs/go-ipfs/assets"
|
||||
@ -27,6 +28,13 @@ var initCmd = &cmds.Command{
|
||||
ShortDescription: `
|
||||
Initializes ipfs configuration files and generates a new keypair.
|
||||
|
||||
If you are going to run IPFS in server environment, you may want to
|
||||
initialize it using 'server' profile.
|
||||
|
||||
Available profiles:
|
||||
'server' - Disables local host discovery, recommended when
|
||||
running IPFS on machines with public IPv4 addresses.
|
||||
|
||||
ipfs uses a repository in the local file system. By default, the repo is
|
||||
located at ~/.ipfs. To change the repo location, set the $IPFS_PATH
|
||||
environment variable:
|
||||
@ -40,6 +48,7 @@ environment variable:
|
||||
Options: []cmds.Option{
|
||||
cmds.IntOption("bits", "b", "Number of bits to use in the generated RSA private key.").Default(nBitsForKeypairDefault),
|
||||
cmds.BoolOption("empty-repo", "e", "Don't add and pin help files to the local storage.").Default(false),
|
||||
cmds.StringOption("profile", "p", "Apply profile settings to config. Multiple profiles can be separated by ','"),
|
||||
|
||||
// TODO need to decide whether to expose the override as a file or a
|
||||
// directory. That is: should we allow the user to also specify the
|
||||
@ -96,7 +105,18 @@ environment variable:
|
||||
}
|
||||
}
|
||||
|
||||
if err := doInit(os.Stdout, req.InvocContext().ConfigRoot, empty, nBitsForKeypair, conf); err != nil {
|
||||
profile, _, err := req.Option("profile").String()
|
||||
if err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
|
||||
var profiles []string
|
||||
if profile != "" {
|
||||
profiles = strings.Split(profile, ",")
|
||||
}
|
||||
|
||||
if err := doInit(os.Stdout, req.InvocContext().ConfigRoot, empty, nBitsForKeypair, profiles, conf); err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
@ -108,10 +128,10 @@ Reinitializing would overwrite your keys.
|
||||
`)
|
||||
|
||||
func initWithDefaults(out io.Writer, repoRoot string) error {
|
||||
return doInit(out, repoRoot, false, nBitsForKeypairDefault, nil)
|
||||
return doInit(out, repoRoot, false, nBitsForKeypairDefault, nil, nil)
|
||||
}
|
||||
|
||||
func doInit(out io.Writer, repoRoot string, empty bool, nBitsForKeypair int, conf *config.Config) error {
|
||||
func doInit(out io.Writer, repoRoot string, empty bool, nBitsForKeypair int, confProfiles []string, conf *config.Config) error {
|
||||
if _, err := fmt.Fprintf(out, "initializing IPFS node at %s\n", repoRoot); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -132,6 +152,17 @@ func doInit(out io.Writer, repoRoot string, empty bool, nBitsForKeypair int, con
|
||||
}
|
||||
}
|
||||
|
||||
for _, profile := range confProfiles {
|
||||
transformer, ok := config.ConfigProfiles[profile]
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid configuration profile: %s", profile)
|
||||
}
|
||||
|
||||
if err := transformer(conf); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if err := fsrepo.Init(repoRoot, conf); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -21,11 +21,11 @@ import (
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
|
||||
ci "gx/ipfs/QmP1DfoUjiWH2ZBo1PBH6FupdBucbDepx3HpWmEY6JMUpY/go-libp2p-crypto"
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dsync "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
retry "gx/ipfs/QmPP91WFAb8LCs8EMzGvDPPvg1kacbqRkoxgTTnUsZckGe/retry-datastore"
|
||||
metrics "gx/ipfs/QmRg1gKTHzc3CZXSKzem8aR4E3TubFhbgXwfVuWnSK5CC5/go-metrics-interface"
|
||||
goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context"
|
||||
retry "gx/ipfs/QmUaGhKyLgTuYDdQsbKST1tYr2CVoix59rqaxdxqk2UbfK/retry-datastore"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dsync "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
pstore "gx/ipfs/QmXZSd1qR5BxZkPyuwfT5jpqQFScZccoZvDneXsKzCNHWX/go-libp2p-peerstore"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
|
||||
"gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -7,13 +7,13 @@ import (
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
|
||||
"github.com/ipfs/go-ipfs/blocks"
|
||||
util "github.com/ipfs/go-ipfs/blocks/blockstore/util"
|
||||
cmds "github.com/ipfs/go-ipfs/commands"
|
||||
|
||||
mh "gx/ipfs/QmVGtdTZdTFaLsaj2RwdVG8jcjNNcp1DE914DKZ2kHmXHw/go-multihash"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
type BlockStat struct {
|
||||
@ -149,20 +149,15 @@ It reads from stdin, and <key> is a base58 encoded multihash.
|
||||
pref.Version = 1
|
||||
|
||||
format, _, _ := req.Option("format").String()
|
||||
switch format {
|
||||
case "cbor":
|
||||
pref.Codec = cid.DagCBOR
|
||||
case "protobuf":
|
||||
pref.Codec = cid.DagProtobuf
|
||||
case "raw":
|
||||
pref.Codec = cid.Raw
|
||||
case "v0":
|
||||
pref.Version = 0
|
||||
pref.Codec = cid.DagProtobuf
|
||||
default:
|
||||
formatval, ok := cid.Codecs[format]
|
||||
if !ok {
|
||||
res.SetError(fmt.Errorf("unrecognized format: %s", format), cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
if format == "v0" {
|
||||
pref.Version = 0
|
||||
}
|
||||
pref.Codec = formatval
|
||||
|
||||
mhtype, _, _ := req.Option("mhtype").String()
|
||||
mhtval, ok := mh.Names[mhtype]
|
||||
|
@ -8,10 +8,11 @@ import (
|
||||
|
||||
cmds "github.com/ipfs/go-ipfs/commands"
|
||||
path "github.com/ipfs/go-ipfs/path"
|
||||
pin "github.com/ipfs/go-ipfs/pin"
|
||||
|
||||
ipldcbor "gx/ipfs/QmNrbCt8j9DT5W9Pmjy2SdudT9k8GpaDr4sRuFix3BXhgR/go-ipld-cbor"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
ipldcbor "gx/ipfs/Qmcdid3XrCxcoNQUqZKiiKtM7JXxtyipU3izyRqwjFbVWw/go-ipld-cbor"
|
||||
)
|
||||
|
||||
var DagCmd = &cmds.Command{
|
||||
@ -48,6 +49,7 @@ into an object of the specified format.
|
||||
Options: []cmds.Option{
|
||||
cmds.StringOption("format", "f", "Format that the object will be added as.").Default("cbor"),
|
||||
cmds.StringOption("input-enc", "Format that the input object will be.").Default("json"),
|
||||
cmds.BoolOption("pin", "Pin this object when adding.").Default(false),
|
||||
},
|
||||
Run: func(req cmds.Request, res cmds.Response) {
|
||||
n, err := req.InvocContext().GetNode()
|
||||
@ -64,7 +66,17 @@ into an object of the specified format.
|
||||
|
||||
ienc, _, _ := req.Option("input-enc").String()
|
||||
format, _, _ := req.Option("format").String()
|
||||
dopin, _, err := req.Option("pin").Bool()
|
||||
if err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
|
||||
if dopin {
|
||||
defer n.Blockstore.PinLock().Unlock()
|
||||
}
|
||||
|
||||
var c *cid.Cid
|
||||
switch ienc {
|
||||
case "json":
|
||||
nd, err := convertJsonToType(fi, format)
|
||||
@ -73,14 +85,11 @@ into an object of the specified format.
|
||||
return
|
||||
}
|
||||
|
||||
c, err := n.DAG.Add(nd)
|
||||
c, err = n.DAG.Add(nd)
|
||||
if err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
|
||||
res.SetOutput(&OutputObject{Cid: c})
|
||||
return
|
||||
case "raw":
|
||||
nd, err := convertRawToType(fi, format)
|
||||
if err != nil {
|
||||
@ -88,18 +97,27 @@ into an object of the specified format.
|
||||
return
|
||||
}
|
||||
|
||||
c, err := n.DAG.Add(nd)
|
||||
c, err = n.DAG.Add(nd)
|
||||
if err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
|
||||
res.SetOutput(&OutputObject{Cid: c})
|
||||
return
|
||||
default:
|
||||
res.SetError(fmt.Errorf("unrecognized input encoding: %s", ienc), cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
|
||||
if dopin {
|
||||
n.Pinning.PinWithMode(c, pin.Recursive)
|
||||
|
||||
err := n.Pinning.Flush()
|
||||
if err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
res.SetOutput(&OutputObject{Cid: c})
|
||||
},
|
||||
Type: OutputObject{},
|
||||
Marshalers: cmds.MarshalerMap{
|
||||
|
@ -12,14 +12,14 @@ import (
|
||||
dag "github.com/ipfs/go-ipfs/merkledag"
|
||||
path "github.com/ipfs/go-ipfs/path"
|
||||
|
||||
routing "gx/ipfs/QmNdaQ8itUU9jEZUwTsG4gHMaPmRfi6FEe89QjQAFbep3M/go-libp2p-routing"
|
||||
notif "gx/ipfs/QmNdaQ8itUU9jEZUwTsG4gHMaPmRfi6FEe89QjQAFbep3M/go-libp2p-routing/notifications"
|
||||
ipdht "gx/ipfs/QmRmroYSdievxnjiuy99C8BzShNstdEWcEF3LQHF7fUbez/go-libp2p-kad-dht"
|
||||
routing "gx/ipfs/QmP1wMAqk6aZYRZirbaAwmrNeqFRgQrwBt3orUtvSa1UYD/go-libp2p-routing"
|
||||
notif "gx/ipfs/QmP1wMAqk6aZYRZirbaAwmrNeqFRgQrwBt3orUtvSa1UYD/go-libp2p-routing/notifications"
|
||||
b58 "gx/ipfs/QmT8rehPR3F6bmwL6zjUN8XpiDBFFpMP2myPdC6ApsWfJf/go-base58"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
pstore "gx/ipfs/QmXZSd1qR5BxZkPyuwfT5jpqQFScZccoZvDneXsKzCNHWX/go-libp2p-peerstore"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
ipdht "gx/ipfs/QmfDWfnZZiwHSD58FE2PveLQhZZhZjbuvo1TU1Zu4P9Hd3/go-libp2p-kad-dht"
|
||||
)
|
||||
|
||||
var ErrNotDHT = errors.New("routing service is not a DHT")
|
||||
|
@ -18,8 +18,8 @@ import (
|
||||
ft "github.com/ipfs/go-ipfs/unixfs"
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
)
|
||||
|
||||
var log = logging.Logger("cmds/files")
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"github.com/ipfs/go-ipfs/core"
|
||||
"github.com/ipfs/go-ipfs/filestore"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
var FileStoreCmd = &cmds.Command{
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
unixfspb "github.com/ipfs/go-ipfs/unixfs/pb"
|
||||
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
)
|
||||
|
||||
type LsLink struct {
|
||||
|
@ -18,8 +18,8 @@ import (
|
||||
path "github.com/ipfs/go-ipfs/path"
|
||||
ft "github.com/ipfs/go-ipfs/unixfs"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// ErrObjectTooLarge is returned when too much data was read from stdin. current limit 2m
|
||||
|
@ -14,14 +14,14 @@ import (
|
||||
ma "gx/ipfs/QmcyqRMCAXVtYPS4DiBrA7sezL9rRGfW8Ctx7cywL4TXJj/go-multiaddr"
|
||||
)
|
||||
|
||||
// PTPListenerInfoOutput is output type of ls command
|
||||
type PTPListenerInfoOutput struct {
|
||||
// P2PListenerInfoOutput is output type of ls command
|
||||
type P2PListenerInfoOutput struct {
|
||||
Protocol string
|
||||
Address string
|
||||
}
|
||||
|
||||
// PTPStreamInfoOutput is output type of streams command
|
||||
type PTPStreamInfoOutput struct {
|
||||
// P2PStreamInfoOutput is output type of streams command
|
||||
type P2PStreamInfoOutput struct {
|
||||
HandlerID string
|
||||
Protocol string
|
||||
LocalPeer string
|
||||
@ -30,18 +30,18 @@ type PTPStreamInfoOutput struct {
|
||||
RemoteAddress string
|
||||
}
|
||||
|
||||
// PTPLsOutput is output type of ls command
|
||||
type PTPLsOutput struct {
|
||||
Listeners []PTPListenerInfoOutput
|
||||
// P2PLsOutput is output type of ls command
|
||||
type P2PLsOutput struct {
|
||||
Listeners []P2PListenerInfoOutput
|
||||
}
|
||||
|
||||
// PTPStreamsOutput is output type of streams command
|
||||
type PTPStreamsOutput struct {
|
||||
Streams []PTPStreamInfoOutput
|
||||
// P2PStreamsOutput is output type of streams command
|
||||
type P2PStreamsOutput struct {
|
||||
Streams []P2PStreamInfoOutput
|
||||
}
|
||||
|
||||
// PTPCmd is the 'ipfs ptp' command
|
||||
var PTPCmd = &cmds.Command{
|
||||
// P2PCmd is the 'ipfs p2p' command
|
||||
var P2PCmd = &cmds.Command{
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "Libp2p stream mounting.",
|
||||
ShortDescription: `
|
||||
@ -51,40 +51,40 @@ Note: this command is experimental and subject to change as usecases and APIs ar
|
||||
},
|
||||
|
||||
Subcommands: map[string]*cmds.Command{
|
||||
"listener": ptpListenerCmd,
|
||||
"stream": ptpStreamCmd,
|
||||
"listener": p2pListenerCmd,
|
||||
"stream": p2pStreamCmd,
|
||||
},
|
||||
}
|
||||
|
||||
// ptpListenerCmd is the 'ipfs ptp listener' command
|
||||
var ptpListenerCmd = &cmds.Command{
|
||||
// p2pListenerCmd is the 'ipfs p2p listener' command
|
||||
var p2pListenerCmd = &cmds.Command{
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "P2P listener management.",
|
||||
ShortDescription: "Create and manage listener p2p endpoints",
|
||||
},
|
||||
|
||||
Subcommands: map[string]*cmds.Command{
|
||||
"ls": ptpListenerLsCmd,
|
||||
"open": ptpListenerListenCmd,
|
||||
"close": ptpListenerCloseCmd,
|
||||
"ls": p2pListenerLsCmd,
|
||||
"open": p2pListenerListenCmd,
|
||||
"close": p2pListenerCloseCmd,
|
||||
},
|
||||
}
|
||||
|
||||
// ptpStreamCmd is the 'ipfs ptp stream' command
|
||||
var ptpStreamCmd = &cmds.Command{
|
||||
// p2pStreamCmd is the 'ipfs p2p stream' command
|
||||
var p2pStreamCmd = &cmds.Command{
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "P2P stream management.",
|
||||
ShortDescription: "Create and manage p2p streams",
|
||||
},
|
||||
|
||||
Subcommands: map[string]*cmds.Command{
|
||||
"ls": ptpStreamLsCmd,
|
||||
"dial": ptpStreamDialCmd,
|
||||
"close": ptpStreamCloseCmd,
|
||||
"ls": p2pStreamLsCmd,
|
||||
"dial": p2pStreamDialCmd,
|
||||
"close": p2pStreamCloseCmd,
|
||||
},
|
||||
}
|
||||
|
||||
var ptpListenerLsCmd = &cmds.Command{
|
||||
var p2pListenerLsCmd = &cmds.Command{
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "List active p2p listeners.",
|
||||
},
|
||||
@ -99,10 +99,10 @@ var ptpListenerLsCmd = &cmds.Command{
|
||||
return
|
||||
}
|
||||
|
||||
output := &PTPLsOutput{}
|
||||
output := &P2PLsOutput{}
|
||||
|
||||
for _, listener := range n.PTP.Listeners.Listeners {
|
||||
output.Listeners = append(output.Listeners, PTPListenerInfoOutput{
|
||||
for _, listener := range n.P2P.Listeners.Listeners {
|
||||
output.Listeners = append(output.Listeners, P2PListenerInfoOutput{
|
||||
Protocol: listener.Protocol,
|
||||
Address: listener.Address.String(),
|
||||
})
|
||||
@ -110,11 +110,11 @@ var ptpListenerLsCmd = &cmds.Command{
|
||||
|
||||
res.SetOutput(output)
|
||||
},
|
||||
Type: PTPLsOutput{},
|
||||
Type: P2PLsOutput{},
|
||||
Marshalers: cmds.MarshalerMap{
|
||||
cmds.Text: func(res cmds.Response) (io.Reader, error) {
|
||||
headers, _, _ := res.Request().Option("headers").Bool()
|
||||
list, _ := res.Output().(*PTPLsOutput)
|
||||
list, _ := res.Output().(*P2PLsOutput)
|
||||
buf := new(bytes.Buffer)
|
||||
w := tabwriter.NewWriter(buf, 1, 2, 1, ' ', 0)
|
||||
for _, listener := range list.Listeners {
|
||||
@ -131,7 +131,7 @@ var ptpListenerLsCmd = &cmds.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var ptpStreamLsCmd = &cmds.Command{
|
||||
var p2pStreamLsCmd = &cmds.Command{
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "List active p2p streams.",
|
||||
},
|
||||
@ -145,10 +145,10 @@ var ptpStreamLsCmd = &cmds.Command{
|
||||
return
|
||||
}
|
||||
|
||||
output := &PTPStreamsOutput{}
|
||||
output := &P2PStreamsOutput{}
|
||||
|
||||
for _, s := range n.PTP.Streams.Streams {
|
||||
output.Streams = append(output.Streams, PTPStreamInfoOutput{
|
||||
for _, s := range n.P2P.Streams.Streams {
|
||||
output.Streams = append(output.Streams, P2PStreamInfoOutput{
|
||||
HandlerID: strconv.FormatUint(s.HandlerID, 10),
|
||||
|
||||
Protocol: s.Protocol,
|
||||
@ -163,11 +163,11 @@ var ptpStreamLsCmd = &cmds.Command{
|
||||
|
||||
res.SetOutput(output)
|
||||
},
|
||||
Type: PTPStreamsOutput{},
|
||||
Type: P2PStreamsOutput{},
|
||||
Marshalers: cmds.MarshalerMap{
|
||||
cmds.Text: func(res cmds.Response) (io.Reader, error) {
|
||||
headers, _, _ := res.Request().Option("headers").Bool()
|
||||
list, _ := res.Output().(*PTPStreamsOutput)
|
||||
list, _ := res.Output().(*P2PStreamsOutput)
|
||||
buf := new(bytes.Buffer)
|
||||
w := tabwriter.NewWriter(buf, 1, 2, 1, ' ', 0)
|
||||
for _, stream := range list.Streams {
|
||||
@ -184,7 +184,7 @@ var ptpStreamLsCmd = &cmds.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var ptpListenerListenCmd = &cmds.Command{
|
||||
var p2pListenerListenCmd = &cmds.Command{
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "Forward p2p connections to a network multiaddr.",
|
||||
ShortDescription: `
|
||||
@ -204,8 +204,8 @@ Note that the connections originate from the ipfs daemon process.
|
||||
return
|
||||
}
|
||||
|
||||
proto := "/ptp/" + req.Arguments()[0]
|
||||
if n.PTP.CheckProtoExists(proto) {
|
||||
proto := "/p2p/" + req.Arguments()[0]
|
||||
if n.P2P.CheckProtoExists(proto) {
|
||||
res.SetError(errors.New("protocol handler already registered"), cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
@ -216,21 +216,21 @@ Note that the connections originate from the ipfs daemon process.
|
||||
return
|
||||
}
|
||||
|
||||
_, err = n.PTP.NewListener(n.Context(), proto, addr)
|
||||
_, err = n.P2P.NewListener(n.Context(), proto, addr)
|
||||
if err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
|
||||
// Successful response.
|
||||
res.SetOutput(&PTPListenerInfoOutput{
|
||||
res.SetOutput(&P2PListenerInfoOutput{
|
||||
Protocol: proto,
|
||||
Address: addr.String(),
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
var ptpStreamDialCmd = &cmds.Command{
|
||||
var p2pStreamDialCmd = &cmds.Command{
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "Dial to a p2p listener.",
|
||||
|
||||
@ -260,7 +260,7 @@ transparently connect to a p2p service.
|
||||
return
|
||||
}
|
||||
|
||||
proto := "/ptp/" + req.Arguments()[1]
|
||||
proto := "/p2p/" + req.Arguments()[1]
|
||||
|
||||
bindAddr, _ := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/0")
|
||||
if len(req.Arguments()) == 3 {
|
||||
@ -271,13 +271,13 @@ transparently connect to a p2p service.
|
||||
}
|
||||
}
|
||||
|
||||
listenerInfo, err := n.PTP.Dial(n.Context(), addr, peer, proto, bindAddr)
|
||||
listenerInfo, err := n.P2P.Dial(n.Context(), addr, peer, proto, bindAddr)
|
||||
if err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
|
||||
output := PTPListenerInfoOutput{
|
||||
output := P2PListenerInfoOutput{
|
||||
Protocol: listenerInfo.Protocol,
|
||||
Address: listenerInfo.Address.String(),
|
||||
}
|
||||
@ -286,7 +286,7 @@ transparently connect to a p2p service.
|
||||
},
|
||||
}
|
||||
|
||||
var ptpListenerCloseCmd = &cmds.Command{
|
||||
var p2pListenerCloseCmd = &cmds.Command{
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "Close active p2p listener.",
|
||||
},
|
||||
@ -312,10 +312,10 @@ var ptpListenerCloseCmd = &cmds.Command{
|
||||
return
|
||||
}
|
||||
|
||||
proto = "/ptp/" + req.Arguments()[0]
|
||||
proto = "/p2p/" + req.Arguments()[0]
|
||||
}
|
||||
|
||||
for _, listener := range n.PTP.Listeners.Listeners {
|
||||
for _, listener := range n.P2P.Listeners.Listeners {
|
||||
if !closeAll && listener.Protocol != proto {
|
||||
continue
|
||||
}
|
||||
@ -327,7 +327,7 @@ var ptpListenerCloseCmd = &cmds.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var ptpStreamCloseCmd = &cmds.Command{
|
||||
var p2pStreamCloseCmd = &cmds.Command{
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "Close active p2p stream.",
|
||||
},
|
||||
@ -360,7 +360,7 @@ var ptpStreamCloseCmd = &cmds.Command{
|
||||
}
|
||||
}
|
||||
|
||||
for _, stream := range n.PTP.Streams.Streams {
|
||||
for _, stream := range n.P2P.Streams.Streams {
|
||||
if !closeAll && handlerID != stream.HandlerID {
|
||||
continue
|
||||
}
|
@ -16,7 +16,7 @@ import (
|
||||
|
||||
context "context"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
var PinCmd = &cmds.Command{
|
||||
|
@ -10,14 +10,14 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
cmds "github.com/ipfs/go-ipfs/commands"
|
||||
core "github.com/ipfs/go-ipfs/core"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
floodsub "gx/ipfs/QmUpeULWfmtsgCnfuRN3BHsfhHvBxNphoYh4La4CMxGt2Z/floodsub"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
pstore "gx/ipfs/QmXZSd1qR5BxZkPyuwfT5jpqQFScZccoZvDneXsKzCNHWX/go-libp2p-peerstore"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
var PubsubCmd = &cmds.Command{
|
||||
|
@ -12,9 +12,9 @@ import (
|
||||
dag "github.com/ipfs/go-ipfs/merkledag"
|
||||
path "github.com/ipfs/go-ipfs/path"
|
||||
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// KeyList is a general type for outputting lists of keys
|
||||
|
@ -17,7 +17,7 @@ import (
|
||||
lockfile "github.com/ipfs/go-ipfs/repo/fsrepo/lock"
|
||||
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
type RepoVersion struct {
|
||||
|
@ -47,7 +47,7 @@ ADVANCED COMMANDS
|
||||
pin Pin objects to local storage
|
||||
repo Manipulate the IPFS repository
|
||||
stats Various operational stats
|
||||
ptp Libp2p stream mounting
|
||||
p2p Libp2p stream mounting
|
||||
filestore Manage the filestore (experimental)
|
||||
|
||||
NETWORK COMMANDS
|
||||
@ -114,7 +114,7 @@ var rootSubcommands = map[string]*cmds.Command{
|
||||
"object": ocmd.ObjectCmd,
|
||||
"pin": PinCmd,
|
||||
"ping": PingCmd,
|
||||
"ptp": PTPCmd,
|
||||
"p2p": P2PCmd,
|
||||
"pubsub": PubsubCmd,
|
||||
"refs": RefsCmd,
|
||||
"repo": RepoCmd,
|
||||
|
14
core/core.go
14
core/core.go
@ -33,17 +33,17 @@ import (
|
||||
mfs "github.com/ipfs/go-ipfs/mfs"
|
||||
namesys "github.com/ipfs/go-ipfs/namesys"
|
||||
ipnsrp "github.com/ipfs/go-ipfs/namesys/republisher"
|
||||
p2p "github.com/ipfs/go-ipfs/p2p"
|
||||
path "github.com/ipfs/go-ipfs/path"
|
||||
pin "github.com/ipfs/go-ipfs/pin"
|
||||
ptp "github.com/ipfs/go-ipfs/ptp"
|
||||
repo "github.com/ipfs/go-ipfs/repo"
|
||||
config "github.com/ipfs/go-ipfs/repo/config"
|
||||
nilrouting "github.com/ipfs/go-ipfs/routing/none"
|
||||
offroute "github.com/ipfs/go-ipfs/routing/offline"
|
||||
ft "github.com/ipfs/go-ipfs/unixfs"
|
||||
|
||||
routing "gx/ipfs/QmNdaQ8itUU9jEZUwTsG4gHMaPmRfi6FEe89QjQAFbep3M/go-libp2p-routing"
|
||||
ic "gx/ipfs/QmP1DfoUjiWH2ZBo1PBH6FupdBucbDepx3HpWmEY6JMUpY/go-libp2p-crypto"
|
||||
routing "gx/ipfs/QmP1wMAqk6aZYRZirbaAwmrNeqFRgQrwBt3orUtvSa1UYD/go-libp2p-routing"
|
||||
ipnet "gx/ipfs/QmPsBptED6X43GYg3347TAUruN3UfsAhaGTP9xbinYX7uf/go-libp2p-interface-pnet"
|
||||
mplex "gx/ipfs/QmQ3UABWTgK78utKeiVXaH9BrjC7Ydn1pRuwqnWHT3p4zh/go-smux-multiplex"
|
||||
discovery "gx/ipfs/QmQA5mdxru8Bh6dpC9PJfSkumqnmHgJX7knxSgBo5Lpime/go-libp2p/p2p/discovery"
|
||||
@ -52,8 +52,6 @@ import (
|
||||
identify "gx/ipfs/QmQA5mdxru8Bh6dpC9PJfSkumqnmHgJX7knxSgBo5Lpime/go-libp2p/p2p/protocol/identify"
|
||||
ping "gx/ipfs/QmQA5mdxru8Bh6dpC9PJfSkumqnmHgJX7knxSgBo5Lpime/go-libp2p/p2p/protocol/ping"
|
||||
mssmux "gx/ipfs/QmRVYfZ7tWNHPBzWiG6KWGzvT2hcGems8srihsQE29x1U5/go-smux-multistream"
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dht "gx/ipfs/QmRmroYSdievxnjiuy99C8BzShNstdEWcEF3LQHF7fUbez/go-libp2p-kad-dht"
|
||||
goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess"
|
||||
mamask "gx/ipfs/QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv/multiaddr-filter"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
@ -61,16 +59,18 @@ import (
|
||||
pnet "gx/ipfs/QmTJoXQ24GqDf9MqAUwf3vW38HG6ahE9S7GzZoRMEeE8Kc/go-libp2p-pnet"
|
||||
floodsub "gx/ipfs/QmUpeULWfmtsgCnfuRN3BHsfhHvBxNphoYh4La4CMxGt2Z/floodsub"
|
||||
p2phost "gx/ipfs/QmUywuGNZoUKV8B9iyvup9bPkLiMrhTsyVMkeSXW5VxAfC/go-libp2p-host"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
swarm "gx/ipfs/QmVkDnNm71vYyY6s6rXwtmyDYis3WkKyrEhMECwT6R12uJ/go-libp2p-swarm"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
pstore "gx/ipfs/QmXZSd1qR5BxZkPyuwfT5jpqQFScZccoZvDneXsKzCNHWX/go-libp2p-peerstore"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
addrutil "gx/ipfs/QmbH3urJHTrZSUETgvQRriWM6mMFqyNSwCqnhknxfSGVWv/go-addr-util"
|
||||
yamux "gx/ipfs/Qmbn7RYyWzBVXiUp9jZ1dA4VADHy9DtS7iZLwfhEUQvm3U/go-smux-yamux"
|
||||
ma "gx/ipfs/QmcyqRMCAXVtYPS4DiBrA7sezL9rRGfW8Ctx7cywL4TXJj/go-multiaddr"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
metrics "gx/ipfs/QmdibiN2wzuuXXz4JvqQ1ZGW3eUkoAy1AWznHFau6iePCc/go-libp2p-metrics"
|
||||
smux "gx/ipfs/QmeZBgYBHvxMukGK5ojg28BCNLB9SeXqT7XXg6o7r2GbJy/go-stream-muxer"
|
||||
dht "gx/ipfs/QmfDWfnZZiwHSD58FE2PveLQhZZhZjbuvo1TU1Zu4P9Hd3/go-libp2p-kad-dht"
|
||||
)
|
||||
|
||||
const IpnsValidatorTag = "ipns"
|
||||
@ -131,7 +131,7 @@ type IpfsNode struct {
|
||||
IpnsRepub *ipnsrp.Republisher
|
||||
|
||||
Floodsub *floodsub.PubSub
|
||||
PTP *ptp.PTP
|
||||
P2P *p2p.P2P
|
||||
|
||||
proc goprocess.Process
|
||||
ctx context.Context
|
||||
@ -247,7 +247,7 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin
|
||||
n.Floodsub = floodsub.NewFloodSub(ctx, peerhost)
|
||||
}
|
||||
|
||||
n.PTP = ptp.NewPTP(n.Identity, n.PeerHost, n.Peerstore)
|
||||
n.P2P = p2p.NewP2P(n.Identity, n.PeerHost, n.Peerstore)
|
||||
|
||||
// setup local discovery
|
||||
if do != nil {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
ipfspath "github.com/ipfs/go-ipfs/path"
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
type CoreAPI struct {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"errors"
|
||||
"io"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
ipld "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
ipld "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
type Path interface {
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
coreunix "github.com/ipfs/go-ipfs/core/coreunix"
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
type UnixfsAPI CoreAPI
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
config "github.com/ipfs/go-ipfs/repo/config"
|
||||
testutil "github.com/ipfs/go-ipfs/thirdparty/testutil"
|
||||
unixfs "github.com/ipfs/go-ipfs/unixfs"
|
||||
cbor "gx/ipfs/QmNrbCt8j9DT5W9Pmjy2SdudT9k8GpaDr4sRuFix3BXhgR/go-ipld-cbor"
|
||||
cbor "gx/ipfs/Qmcdid3XrCxcoNQUqZKiiKtM7JXxtyipU3izyRqwjFbVWw/go-ipld-cbor"
|
||||
)
|
||||
|
||||
// `echo -n 'hello, world!' | ipfs add`
|
||||
|
@ -23,10 +23,10 @@ import (
|
||||
ft "github.com/ipfs/go-ipfs/unixfs"
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
|
||||
routing "gx/ipfs/QmNdaQ8itUU9jEZUwTsG4gHMaPmRfi6FEe89QjQAFbep3M/go-libp2p-routing"
|
||||
routing "gx/ipfs/QmP1wMAqk6aZYRZirbaAwmrNeqFRgQrwBt3orUtvSa1UYD/go-libp2p-routing"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
multibase "gx/ipfs/QmcxkxTVuURV2Ptse8TvkqH5BQDwV62X1x19JqqvbBzwUM/go-multibase"
|
||||
)
|
||||
|
||||
@ -134,6 +134,7 @@ func (i *gatewayHandler) optionsHandler(w http.ResponseWriter, r *http.Request)
|
||||
func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
urlPath := r.URL.Path
|
||||
escapedURLPath := r.URL.EscapedPath()
|
||||
|
||||
// If the gateway is behind a reverse proxy and mounted at a sub-path,
|
||||
// the prefix header can be set to signal this sub-path.
|
||||
@ -173,12 +174,12 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr
|
||||
case nil:
|
||||
case coreiface.ErrOffline:
|
||||
if !i.node.OnlineMode() {
|
||||
webError(w, "ipfs resolve -r "+urlPath, err, http.StatusServiceUnavailable)
|
||||
webError(w, "ipfs resolve -r "+escapedURLPath, err, http.StatusServiceUnavailable)
|
||||
return
|
||||
}
|
||||
fallthrough
|
||||
default:
|
||||
webError(w, "ipfs resolve -r "+urlPath, err, http.StatusNotFound)
|
||||
webError(w, "ipfs resolve -r "+escapedURLPath, err, http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
@ -191,7 +192,7 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr
|
||||
case coreiface.ErrIsDir:
|
||||
dir = true
|
||||
default:
|
||||
webError(w, "ipfs cat "+urlPath, err, http.StatusNotFound)
|
||||
webError(w, "ipfs cat "+escapedURLPath, err, http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
@ -278,7 +279,7 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr
|
||||
ixnd, err := dirr.Find(ctx, "index.html")
|
||||
switch {
|
||||
case err == nil:
|
||||
log.Debugf("found index.html link for %s", urlPath)
|
||||
log.Debugf("found index.html link for %s", escapedURLPath)
|
||||
|
||||
dirwithoutslash := urlPath[len(urlPath)-1] != '/'
|
||||
goget := r.URL.Query().Get("go-get") == "1"
|
||||
|
@ -140,6 +140,7 @@ func TestGatewayGet(t *testing.T) {
|
||||
{"localhost:5001", "/" + k, http.StatusNotFound, "404 page not found\n"},
|
||||
{"localhost:5001", "/ipfs/" + k, http.StatusOK, "fnord"},
|
||||
{"localhost:5001", "/ipns/nxdomain.example.com", http.StatusNotFound, "ipfs resolve -r /ipns/nxdomain.example.com: " + namesys.ErrResolveFailed.Error() + "\n"},
|
||||
{"localhost:5001", "/ipns/%0D%0A%0D%0Ahello", http.StatusNotFound, "ipfs resolve -r /ipns/%0D%0A%0D%0Ahello: " + namesys.ErrResolveFailed.Error() + "\n"},
|
||||
{"localhost:5001", "/ipns/example.com", http.StatusOK, "fnord"},
|
||||
{"example.com", "/", http.StatusOK, "fnord"},
|
||||
} {
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
|
||||
humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
var log = logging.Logger("corerepo")
|
||||
|
@ -21,8 +21,8 @@ import (
|
||||
path "github.com/ipfs/go-ipfs/path"
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func Pin(n *core.IpfsNode, ctx context.Context, paths []string, recursive bool) ([]*cid.Cid, error) {
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
repo "github.com/ipfs/go-ipfs/repo"
|
||||
supernode "github.com/ipfs/go-ipfs/routing/supernode"
|
||||
gcproxy "github.com/ipfs/go-ipfs/routing/supernode/proxy"
|
||||
routing "gx/ipfs/QmNdaQ8itUU9jEZUwTsG4gHMaPmRfi6FEe89QjQAFbep3M/go-libp2p-routing"
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
routing "gx/ipfs/QmP1wMAqk6aZYRZirbaAwmrNeqFRgQrwBt3orUtvSa1UYD/go-libp2p-routing"
|
||||
"gx/ipfs/QmUywuGNZoUKV8B9iyvup9bPkLiMrhTsyVMkeSXW5VxAfC/go-libp2p-host"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
pstore "gx/ipfs/QmXZSd1qR5BxZkPyuwfT5jpqQFScZccoZvDneXsKzCNHWX/go-libp2p-peerstore"
|
||||
)
|
||||
|
||||
|
@ -24,11 +24,11 @@ import (
|
||||
posinfo "github.com/ipfs/go-ipfs/thirdparty/posinfo"
|
||||
unixfs "github.com/ipfs/go-ipfs/unixfs"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
syncds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
syncds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
var log = logging.Logger("coreunix")
|
||||
|
@ -10,7 +10,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/go-ipfs/blocks"
|
||||
"github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
"github.com/ipfs/go-ipfs/blockservice"
|
||||
"github.com/ipfs/go-ipfs/commands/files"
|
||||
@ -21,8 +20,9 @@ import (
|
||||
"github.com/ipfs/go-ipfs/repo/config"
|
||||
pi "github.com/ipfs/go-ipfs/thirdparty/posinfo"
|
||||
"github.com/ipfs/go-ipfs/thirdparty/testutil"
|
||||
"gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func TestAddRecursive(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
core "github.com/ipfs/go-ipfs/core"
|
||||
dag "github.com/ipfs/go-ipfs/merkledag"
|
||||
ft "github.com/ipfs/go-ipfs/unixfs"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func AddMetadataTo(n *core.IpfsNode, skey string, m *ft.Metadata) (string, error) {
|
||||
|
@ -16,10 +16,10 @@ import (
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
|
||||
context "context"
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dssync "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dssync "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func getDagserv(t *testing.T) merkledag.DAGService {
|
||||
|
@ -13,9 +13,9 @@ import (
|
||||
|
||||
ipnet "gx/ipfs/QmPsBptED6X43GYg3347TAUruN3UfsAhaGTP9xbinYX7uf/go-libp2p-interface-pnet"
|
||||
mocknet "gx/ipfs/QmQA5mdxru8Bh6dpC9PJfSkumqnmHgJX7knxSgBo5Lpime/go-libp2p/p2p/net/mock"
|
||||
"gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
syncds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
host "gx/ipfs/QmUywuGNZoUKV8B9iyvup9bPkLiMrhTsyVMkeSXW5VxAfC/go-libp2p-host"
|
||||
"gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
syncds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
pstore "gx/ipfs/QmXZSd1qR5BxZkPyuwfT5jpqQFScZccoZvDneXsKzCNHWX/go-libp2p-peerstore"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
metrics "gx/ipfs/QmdibiN2wzuuXXz4JvqQ1ZGW3eUkoAy1AWznHFau6iePCc/go-libp2p-metrics"
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
namesys "github.com/ipfs/go-ipfs/namesys"
|
||||
path "github.com/ipfs/go-ipfs/path"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// ErrNoNamesys is an explicit error for when an IPFS node doesn't
|
||||
|
37
docs/developer-certificate-of-origin
Normal file
37
docs/developer-certificate-of-origin
Normal file
@ -0,0 +1,37 @@
|
||||
Developer Certificate of Origin
|
||||
Version 1.1
|
||||
|
||||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
||||
1 Letterman Drive
|
||||
Suite D4700
|
||||
San Francisco, CA, 94129
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
|
||||
Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
(a) The contribution was created in whole or in part by me and I
|
||||
have the right to submit it under the open source license
|
||||
indicated in the file; or
|
||||
|
||||
(b) The contribution is based upon previous work that, to the best
|
||||
of my knowledge, is covered under an appropriate open source
|
||||
license and I have the right under that license to submit that
|
||||
work with modifications, whether created in whole or in part
|
||||
by me, under the same open source license (unless I am
|
||||
permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
|
||||
(c) The contribution was provided directly to me by some other
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
12
docs/transports.md
Normal file
12
docs/transports.md
Normal file
@ -0,0 +1,12 @@
|
||||
## /ws and /wss -- websockets
|
||||
|
||||
If you want browsers to connect to e.g. `/dns4/example.com/tcp/443/wss/ipfs/QmFoo`
|
||||
|
||||
- [ ] An SSL cert matching the `/dns4` or `/dns6` name
|
||||
- [ ] go-ipfs listening on `/ip4/127.0.0.1/tcp/8081/ws`
|
||||
- 8081 is just an example
|
||||
- note that it's `/ws` here, not `/wss` -- go-ipfs can't currently do SSL, see the next point
|
||||
- [ ] nginx
|
||||
- configured with the SSL cert
|
||||
- listening on port 443
|
||||
- forwarding to 127.0.0.1:8081
|
@ -9,7 +9,6 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
blockstore "github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
exchange "github.com/ipfs/go-ipfs/exchange"
|
||||
decision "github.com/ipfs/go-ipfs/exchange/bitswap/decision"
|
||||
@ -18,13 +17,14 @@ import (
|
||||
notifications "github.com/ipfs/go-ipfs/exchange/bitswap/notifications"
|
||||
flags "github.com/ipfs/go-ipfs/flags"
|
||||
"github.com/ipfs/go-ipfs/thirdparty/delay"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
metrics "gx/ipfs/QmRg1gKTHzc3CZXSKzem8aR4E3TubFhbgXwfVuWnSK5CC5/go-metrics-interface"
|
||||
process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess"
|
||||
procctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
loggables "gx/ipfs/QmVesPmqbPp7xRGyY96tnBwzDtVV1nqv4SCVxo5zCqKyH8/go-libp2p-loggables"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
blockstore "github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
blocksutil "github.com/ipfs/go-ipfs/blocks/blocksutil"
|
||||
decision "github.com/ipfs/go-ipfs/exchange/bitswap/decision"
|
||||
@ -16,11 +15,12 @@ import (
|
||||
mockrouting "github.com/ipfs/go-ipfs/routing/mock"
|
||||
delay "github.com/ipfs/go-ipfs/thirdparty/delay"
|
||||
travis "github.com/ipfs/go-ipfs/thirdparty/testutil/ci/travis"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
detectrace "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-detect-race"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
p2ptestutil "gx/ipfs/Qma2j8dYePrvN5DoNgwh1uAuu3FFtEtrUQFmr737ws8nCp/go-libp2p-netutil"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// FIXME the tests are really sensitive to the network delay. fix them to work
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
|
||||
"github.com/ipfs/go-ipfs/thirdparty/testutil"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
"gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -6,11 +6,11 @@ import (
|
||||
"time"
|
||||
|
||||
context "context"
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
bstore "github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
bsmsg "github.com/ipfs/go-ipfs/exchange/bitswap/message"
|
||||
wl "github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -9,12 +9,12 @@ import (
|
||||
"testing"
|
||||
|
||||
context "context"
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
blockstore "github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
message "github.com/ipfs/go-ipfs/exchange/bitswap/message"
|
||||
testutil "github.com/ipfs/go-ipfs/thirdparty/testutil"
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dssync "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dssync "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
|
||||
wl "github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
wantlist "github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
|
||||
pq "github.com/ipfs/go-ipfs/thirdparty/pq"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
"github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
|
||||
"github.com/ipfs/go-ipfs/thirdparty/testutil"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func TestPushPop(t *testing.T) {
|
||||
|
@ -4,14 +4,14 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
pb "github.com/ipfs/go-ipfs/exchange/bitswap/message/pb"
|
||||
wantlist "github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
inet "gx/ipfs/QmRscs8KxrSmSv4iuevHv8JfuUzHBMoqiaHzxfDRiksd6e/go-libp2p-net"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
ggio "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io"
|
||||
proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// TODO move message.go into the bitswap package
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
|
||||
proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
pb "github.com/ipfs/go-ipfs/exchange/bitswap/message/pb"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func mkFakeCid(s string) *cid.Cid {
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"context"
|
||||
|
||||
bsmsg "github.com/ipfs/go-ipfs/exchange/bitswap/message"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
protocol "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -8,13 +8,13 @@ import (
|
||||
|
||||
bsmsg "github.com/ipfs/go-ipfs/exchange/bitswap/message"
|
||||
|
||||
routing "gx/ipfs/QmNdaQ8itUU9jEZUwTsG4gHMaPmRfi6FEe89QjQAFbep3M/go-libp2p-routing"
|
||||
routing "gx/ipfs/QmP1wMAqk6aZYRZirbaAwmrNeqFRgQrwBt3orUtvSa1UYD/go-libp2p-routing"
|
||||
inet "gx/ipfs/QmRscs8KxrSmSv4iuevHv8JfuUzHBMoqiaHzxfDRiksd6e/go-libp2p-net"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
host "gx/ipfs/QmUywuGNZoUKV8B9iyvup9bPkLiMrhTsyVMkeSXW5VxAfC/go-libp2p-host"
|
||||
pstore "gx/ipfs/QmXZSd1qR5BxZkPyuwfT5jpqQFScZccoZvDneXsKzCNHWX/go-libp2p-peerstore"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
ggio "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
ma "gx/ipfs/QmcyqRMCAXVtYPS4DiBrA7sezL9rRGfW8Ctx7cywL4TXJj/go-multiaddr"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
@ -3,10 +3,10 @@ package notifications
|
||||
import (
|
||||
"context"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
pubsub "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/briantigerchow/pubsub"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
const bufferSize = 16
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
blocksutil "github.com/ipfs/go-ipfs/blocks/blocksutil"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func TestDuplicates(t *testing.T) {
|
||||
|
@ -3,7 +3,7 @@ package bitswap
|
||||
import (
|
||||
"sort"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
type Stat struct {
|
||||
|
@ -5,12 +5,12 @@ import (
|
||||
"testing"
|
||||
|
||||
context "context"
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
bsmsg "github.com/ipfs/go-ipfs/exchange/bitswap/message"
|
||||
bsnet "github.com/ipfs/go-ipfs/exchange/bitswap/network"
|
||||
mockrouting "github.com/ipfs/go-ipfs/routing/mock"
|
||||
delay "github.com/ipfs/go-ipfs/thirdparty/delay"
|
||||
testutil "github.com/ipfs/go-ipfs/thirdparty/testutil"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
mockrouting "github.com/ipfs/go-ipfs/routing/mock"
|
||||
testutil "github.com/ipfs/go-ipfs/thirdparty/testutil"
|
||||
mockpeernet "gx/ipfs/QmQA5mdxru8Bh6dpC9PJfSkumqnmHgJX7knxSgBo5Lpime/go-libp2p/p2p/net/mock"
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
mockrouting "github.com/ipfs/go-ipfs/routing/mock"
|
||||
delay "github.com/ipfs/go-ipfs/thirdparty/delay"
|
||||
testutil "github.com/ipfs/go-ipfs/thirdparty/testutil"
|
||||
routing "gx/ipfs/QmNdaQ8itUU9jEZUwTsG4gHMaPmRfi6FEe89QjQAFbep3M/go-libp2p-routing"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
routing "gx/ipfs/QmP1wMAqk6aZYRZirbaAwmrNeqFRgQrwBt3orUtvSa1UYD/go-libp2p-routing"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
delay "github.com/ipfs/go-ipfs/thirdparty/delay"
|
||||
testutil "github.com/ipfs/go-ipfs/thirdparty/testutil"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
ds_sync "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
ds_sync "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
p2ptestutil "gx/ipfs/Qma2j8dYePrvN5DoNgwh1uAuu3FFtEtrUQFmr737ws8nCp/go-libp2p-netutil"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"sort"
|
||||
"sync"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
type ThreadSafe struct {
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
wantlist "github.com/ipfs/go-ipfs/exchange/bitswap/wantlist"
|
||||
|
||||
metrics "gx/ipfs/QmRg1gKTHzc3CZXSKzem8aR4E3TubFhbgXwfVuWnSK5CC5/go-metrics-interface"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
process "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess"
|
||||
procctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
)
|
||||
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// Any type that implements exchange.Interface may be used as an IPFS block
|
||||
|
@ -5,11 +5,11 @@ package offline
|
||||
import (
|
||||
"context"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
"github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
exchange "github.com/ipfs/go-ipfs/exchange"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func Exchange(bs blockstore.Blockstore) exchange.Interface {
|
||||
|
@ -4,14 +4,14 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
"github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
"github.com/ipfs/go-ipfs/blocks/blocksutil"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
ds_sync "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
ds_sync "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func TestBlockReturnsErr(t *testing.T) {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
routing "gx/ipfs/QmNdaQ8itUU9jEZUwTsG4gHMaPmRfi6FEe89QjQAFbep3M/go-libp2p-routing"
|
||||
routing "gx/ipfs/QmP1wMAqk6aZYRZirbaAwmrNeqFRgQrwBt3orUtvSa1UYD/go-libp2p-routing"
|
||||
backoff "gx/ipfs/QmPJUtEJsm5YLUWhF6imvyCH8KZXRJa9Wup7FDMwTy5Ufz/backoff"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
)
|
||||
|
@ -4,13 +4,13 @@ import (
|
||||
"testing"
|
||||
|
||||
context "context"
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
blockstore "github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
mock "github.com/ipfs/go-ipfs/routing/mock"
|
||||
testutil "github.com/ipfs/go-ipfs/thirdparty/testutil"
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dssync "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/sync"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dssync "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
pstore "gx/ipfs/QmXZSd1qR5BxZkPyuwfT5jpqQFScZccoZvDneXsKzCNHWX/go-libp2p-peerstore"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
. "github.com/ipfs/go-ipfs/exchange/reprovide"
|
||||
)
|
||||
|
@ -10,13 +10,13 @@ package filestore
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/ipfs/go-ipfs/blocks"
|
||||
"github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
posinfo "github.com/ipfs/go-ipfs/thirdparty/posinfo"
|
||||
"gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
dsq "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/query"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
dsq "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/query"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
var log = logging.Logger("filestore")
|
||||
|
@ -11,8 +11,8 @@ import (
|
||||
dag "github.com/ipfs/go-ipfs/merkledag"
|
||||
posinfo "github.com/ipfs/go-ipfs/thirdparty/posinfo"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func newTestFilestore(t *testing.T) (string, *Filestore) {
|
||||
|
@ -7,17 +7,17 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/ipfs/go-ipfs/blocks"
|
||||
"github.com/ipfs/go-ipfs/blocks/blockstore"
|
||||
pb "github.com/ipfs/go-ipfs/filestore/pb"
|
||||
dshelp "github.com/ipfs/go-ipfs/thirdparty/ds-help"
|
||||
posinfo "github.com/ipfs/go-ipfs/thirdparty/posinfo"
|
||||
"gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dsns "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/namespace"
|
||||
dsq "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/query"
|
||||
proto "gx/ipfs/QmT6n4mspWYEya864BhCUJEgyxiRfmiSY9ruQwTUNpRKaM/protobuf/proto"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dsns "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/namespace"
|
||||
dsq "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/query"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// FilestorePrefix identifies the key prefix for FileManager blocks.
|
||||
@ -59,7 +59,6 @@ func NewFileManager(ds ds.Batching, root string) *FileManager {
|
||||
// closed.
|
||||
func (f *FileManager) AllKeysChan(ctx context.Context) (<-chan *cid.Cid, error) {
|
||||
q := dsq.Query{KeysOnly: true}
|
||||
q.Prefix = FilestorePrefix.String()
|
||||
|
||||
res, err := f.ds.Query(q)
|
||||
if err != nil {
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
pb "github.com/ipfs/go-ipfs/filestore/pb"
|
||||
dshelp "github.com/ipfs/go-ipfs/thirdparty/ds-help"
|
||||
|
||||
ds "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore"
|
||||
dsq "gx/ipfs/QmRWDav6mzWseLWeYfVd5fvUKiVe9xNH29YfMF438fG364/go-datastore/query"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dsq "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/query"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// Status is used to identify the state of the block data referenced
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
|
||||
ci "gx/ipfs/QmP1DfoUjiWH2ZBo1PBH6FupdBucbDepx3HpWmEY6JMUpY/go-libp2p-crypto"
|
||||
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
fuse "gx/ipfs/QmaFNtBAXX4nVMQWbUqNysXyhevUj1k4B1y5uS45LC7Vw9/fuse"
|
||||
fs "gx/ipfs/QmaFNtBAXX4nVMQWbUqNysXyhevUj1k4B1y5uS45LC7Vw9/fuse/fs"
|
||||
peer "gx/ipfs/QmdS9KpbDyPrieswibZhkod1oXqRwZJrUPzxCofAMWpFGq/go-libp2p-peer"
|
||||
|
@ -22,9 +22,9 @@ import (
|
||||
ci "github.com/ipfs/go-ipfs/thirdparty/testutil/ci"
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
fstest "gx/ipfs/QmaFNtBAXX4nVMQWbUqNysXyhevUj1k4B1y5uS45LC7Vw9/fuse/fs/fstestutil"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
)
|
||||
|
||||
func maybeSkipFuseTests(t *testing.T) {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
h "github.com/ipfs/go-ipfs/importer/helpers"
|
||||
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
)
|
||||
|
||||
func BalancedLayout(db *h.DagBuilderHelper) (node.Node, error) {
|
||||
|
@ -3,8 +3,8 @@ package chunk
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/ipfs/go-ipfs/blocks"
|
||||
"gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
"gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
"io"
|
||||
"testing"
|
||||
)
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
dag "github.com/ipfs/go-ipfs/merkledag"
|
||||
ft "github.com/ipfs/go-ipfs/unixfs"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// DagBuilderHelper wraps together a bunch of objects needed to
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
pi "github.com/ipfs/go-ipfs/thirdparty/posinfo"
|
||||
ft "github.com/ipfs/go-ipfs/unixfs"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// BlockSizeLimit specifies the maximum size an imported block can have.
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
trickle "github.com/ipfs/go-ipfs/importer/trickle"
|
||||
dag "github.com/ipfs/go-ipfs/merkledag"
|
||||
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
)
|
||||
|
||||
// Builds a DAG from the given file, writing created blocks to disk as they are
|
||||
|
@ -12,8 +12,8 @@ import (
|
||||
mdtest "github.com/ipfs/go-ipfs/merkledag/test"
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
)
|
||||
|
||||
func getBalancedDag(t testing.TB, size int64, blksize int64) (node.Node, dag.DAGService) {
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
dag "github.com/ipfs/go-ipfs/merkledag"
|
||||
ft "github.com/ipfs/go-ipfs/unixfs"
|
||||
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
)
|
||||
|
||||
// layerRepeat specifies how many times to append a child tree of a
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
|
||||
pb "github.com/ipfs/go-ipfs/merkledag/pb"
|
||||
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
// for now, we use a PBNode intermediate thing.
|
||||
|
@ -7,13 +7,13 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
bserv "github.com/ipfs/go-ipfs/blockservice"
|
||||
offline "github.com/ipfs/go-ipfs/exchange/offline"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
ipldcbor "gx/ipfs/QmNrbCt8j9DT5W9Pmjy2SdudT9k8GpaDr4sRuFix3BXhgR/go-ipld-cbor"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
ipldcbor "gx/ipfs/Qmcdid3XrCxcoNQUqZKiiKtM7JXxtyipU3izyRqwjFbVWw/go-ipld-cbor"
|
||||
)
|
||||
|
||||
var ErrNotFound = fmt.Errorf("merkledag: not found")
|
||||
|
@ -13,7 +13,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
blocks "github.com/ipfs/go-ipfs/blocks"
|
||||
bserv "github.com/ipfs/go-ipfs/blockservice"
|
||||
bstest "github.com/ipfs/go-ipfs/blockservice/test"
|
||||
offline "github.com/ipfs/go-ipfs/exchange/offline"
|
||||
@ -23,10 +22,11 @@ import (
|
||||
mdpb "github.com/ipfs/go-ipfs/merkledag/pb"
|
||||
dstest "github.com/ipfs/go-ipfs/merkledag/test"
|
||||
uio "github.com/ipfs/go-ipfs/unixfs/io"
|
||||
blocks "gx/ipfs/QmXxGS5QsUxpR3iqL5DjmsYPHR1Yz74siRQ4ChJqWFosMh/go-block-format"
|
||||
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
u "gx/ipfs/QmWbjfz3u6HkAdPh34dgPchGbQjob6LXLhAeCGii2TX69n/go-ipfs-util"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
func TestNode(t *testing.T) {
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
mh "gx/ipfs/QmVGtdTZdTFaLsaj2RwdVG8jcjNNcp1DE914DKZ2kHmXHw/go-multihash"
|
||||
cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid"
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
cid "gx/ipfs/Qma4RJSuh7mMeJQYCqMbKzekn6EwBo7HEs5AQYjVRMQATB/go-cid"
|
||||
)
|
||||
|
||||
var ErrNotProtobuf = fmt.Errorf("expected protobuf dag node")
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
. "github.com/ipfs/go-ipfs/merkledag"
|
||||
mdtest "github.com/ipfs/go-ipfs/merkledag/test"
|
||||
|
||||
node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format"
|
||||
node "gx/ipfs/QmPAKbSsgEX5B6fpmxa61jXYnoWzZr5sNafd3qgPiSH8Uv/go-ipld-format"
|
||||
)
|
||||
|
||||
func TestRemoveLink(t *testing.T) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user