diff --git a/dht.go b/dht.go index 31979aa..2a34965 100644 --- a/dht.go +++ b/dht.go @@ -10,21 +10,21 @@ import ( "time" key "github.com/ipfs/go-ipfs/blocks/key" - ci "github.com/ipfs/go-ipfs/p2p/crypto" - host "github.com/ipfs/go-ipfs/p2p/host" - peer "github.com/ipfs/go-ipfs/p2p/peer" - protocol "github.com/ipfs/go-ipfs/p2p/protocol" routing "github.com/ipfs/go-ipfs/routing" pb "github.com/ipfs/go-ipfs/routing/dht/pb" kb "github.com/ipfs/go-ipfs/routing/kbucket" record "github.com/ipfs/go-ipfs/routing/record" - logging "github.com/ipfs/go-ipfs/vendor/QmQg1J6vikuXF9oDvm4wpdeAUvvkVEKW1EYDw9HhTMnP2b/go-log" + logging "gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log" + ci "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/crypto" + host "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/host" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" + protocol "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/protocol" proto "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/proto" ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" goprocess "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess" goprocessctx "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/context" - context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" + context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) var log = logging.Logger("dht") diff --git a/dht_bootstrap.go b/dht_bootstrap.go index 4a07d9f..d9b62c3 100644 --- a/dht_bootstrap.go +++ b/dht_bootstrap.go @@ -8,13 +8,13 @@ import ( "sync" "time" - peer "github.com/ipfs/go-ipfs/p2p/peer" routing "github.com/ipfs/go-ipfs/routing" u "github.com/ipfs/go-ipfs/util" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" goprocess "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess" periodicproc "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/periodic" - context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" + context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) // BootstrapConfig specifies parameters used bootstrapping the DHT. diff --git a/dht_net.go b/dht_net.go index 722ece7..aa04993 100644 --- a/dht_net.go +++ b/dht_net.go @@ -6,10 +6,10 @@ import ( ggio "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/io" ctxio "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-context/io" - context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" - inet "github.com/ipfs/go-ipfs/p2p/net" - peer "github.com/ipfs/go-ipfs/p2p/peer" + context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" pb "github.com/ipfs/go-ipfs/routing/dht/pb" + inet "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/net" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" ) // handleNewStream implements the inet.StreamHandler @@ -71,7 +71,7 @@ func (dht *IpfsDHT) handleNewMessage(s inet.Stream) { func (dht *IpfsDHT) sendRequest(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error) { log.Debugf("%s dht starting stream", dht.self) - s, err := dht.host.NewStream(ProtocolDHT, p) + s, err := dht.host.NewStream(ctx, ProtocolDHT, p) if err != nil { return nil, err } @@ -109,7 +109,7 @@ func (dht *IpfsDHT) sendRequest(ctx context.Context, p peer.ID, pmes *pb.Message func (dht *IpfsDHT) sendMessage(ctx context.Context, p peer.ID, pmes *pb.Message) error { log.Debugf("%s dht starting stream", dht.self) - s, err := dht.host.NewStream(ProtocolDHT, p) + s, err := dht.host.NewStream(ctx, ProtocolDHT, p) if err != nil { return err } diff --git a/dht_test.go b/dht_test.go index 32560c5..b5499d0 100644 --- a/dht_test.go +++ b/dht_test.go @@ -11,15 +11,15 @@ import ( ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" dssync "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync" - ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" - context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" + context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" + ma "gx/ipfs/QmR3JkmZBKYXgNMNsNZawm914455Qof3PEopwuVSeXG7aV/go-multiaddr" key "github.com/ipfs/go-ipfs/blocks/key" - peer "github.com/ipfs/go-ipfs/p2p/peer" - netutil "github.com/ipfs/go-ipfs/p2p/test/util" routing "github.com/ipfs/go-ipfs/routing" record "github.com/ipfs/go-ipfs/routing/record" u "github.com/ipfs/go-ipfs/util" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" + netutil "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/test/util" ci "github.com/ipfs/go-ipfs/util/testutil/ci" travisci "github.com/ipfs/go-ipfs/util/testutil/ci/travis" diff --git a/diag.go b/diag.go index a7a632c..3a466ed 100644 --- a/diag.go +++ b/diag.go @@ -4,7 +4,7 @@ import ( "encoding/json" "time" - peer "github.com/ipfs/go-ipfs/p2p/peer" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" ) type connDiagInfo struct { diff --git a/ext_test.go b/ext_test.go index a770a09..75ef480 100644 --- a/ext_test.go +++ b/ext_test.go @@ -10,16 +10,16 @@ import ( ggio "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/io" ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" dssync "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync" - context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" + context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" key "github.com/ipfs/go-ipfs/blocks/key" - inet "github.com/ipfs/go-ipfs/p2p/net" - mocknet "github.com/ipfs/go-ipfs/p2p/net/mock" - peer "github.com/ipfs/go-ipfs/p2p/peer" routing "github.com/ipfs/go-ipfs/routing" pb "github.com/ipfs/go-ipfs/routing/dht/pb" record "github.com/ipfs/go-ipfs/routing/record" u "github.com/ipfs/go-ipfs/util" + inet "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/net" + mocknet "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/net/mock" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" ) func TestGetFailures(t *testing.T) { @@ -120,7 +120,7 @@ func TestGetFailures(t *testing.T) { Record: rec, } - s, err := hosts[1].NewStream(ProtocolDHT, hosts[0].ID()) + s, err := hosts[1].NewStream(context.Background(), ProtocolDHT, hosts[0].ID()) if err != nil { t.Fatal(err) } diff --git a/handlers.go b/handlers.go index 121f762..da122bd 100644 --- a/handlers.go +++ b/handlers.go @@ -7,12 +7,12 @@ import ( proto "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/gogo/protobuf/proto" ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" - context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" + context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" key "github.com/ipfs/go-ipfs/blocks/key" - peer "github.com/ipfs/go-ipfs/p2p/peer" pb "github.com/ipfs/go-ipfs/routing/dht/pb" u "github.com/ipfs/go-ipfs/util" lgbl "github.com/ipfs/go-ipfs/util/eventlog/loggables" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" ) // The number of closer peers to send on requests. diff --git a/lookup.go b/lookup.go index dc377e8..01dd899 100644 --- a/lookup.go +++ b/lookup.go @@ -1,12 +1,12 @@ package dht import ( - context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" + context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" key "github.com/ipfs/go-ipfs/blocks/key" notif "github.com/ipfs/go-ipfs/notifications" - peer "github.com/ipfs/go-ipfs/p2p/peer" kb "github.com/ipfs/go-ipfs/routing/kbucket" pset "github.com/ipfs/go-ipfs/util/peerset" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" ) // Required in order for proper JSON marshaling diff --git a/notif.go b/notif.go index cfe411c..00089f0 100644 --- a/notif.go +++ b/notif.go @@ -1,9 +1,9 @@ package dht import ( - ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" + ma "gx/ipfs/QmR3JkmZBKYXgNMNsNZawm914455Qof3PEopwuVSeXG7aV/go-multiaddr" - inet "github.com/ipfs/go-ipfs/p2p/net" + inet "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/net" ) // netNotifiee defines methods to be used with the IpfsDHT diff --git a/pb/message.go b/pb/message.go index f780b1b..c13a5cf 100644 --- a/pb/message.go +++ b/pb/message.go @@ -1,12 +1,12 @@ package dht_pb import ( - ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" + ma "gx/ipfs/QmR3JkmZBKYXgNMNsNZawm914455Qof3PEopwuVSeXG7aV/go-multiaddr" key "github.com/ipfs/go-ipfs/blocks/key" - inet "github.com/ipfs/go-ipfs/p2p/net" - peer "github.com/ipfs/go-ipfs/p2p/peer" - logging "github.com/ipfs/go-ipfs/vendor/QmQg1J6vikuXF9oDvm4wpdeAUvvkVEKW1EYDw9HhTMnP2b/go-log" + logging "gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log" + inet "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/net" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" ) var log = logging.Logger("dht.pb") diff --git a/providers.go b/providers.go index 17455b3..25bb967 100644 --- a/providers.go +++ b/providers.go @@ -6,9 +6,9 @@ import ( "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess" goprocessctx "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/context" key "github.com/ipfs/go-ipfs/blocks/key" - peer "github.com/ipfs/go-ipfs/p2p/peer" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" - context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" + context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) type ProviderManager struct { diff --git a/providers_test.go b/providers_test.go index 7e2e47d..7b16fc8 100644 --- a/providers_test.go +++ b/providers_test.go @@ -4,9 +4,9 @@ import ( "testing" key "github.com/ipfs/go-ipfs/blocks/key" - peer "github.com/ipfs/go-ipfs/p2p/peer" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" - context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" + context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) func TestProviderManager(t *testing.T) { diff --git a/query.go b/query.go index d64e432..70765b6 100644 --- a/query.go +++ b/query.go @@ -5,17 +5,17 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" notif "github.com/ipfs/go-ipfs/notifications" - peer "github.com/ipfs/go-ipfs/p2p/peer" - queue "github.com/ipfs/go-ipfs/p2p/peer/queue" "github.com/ipfs/go-ipfs/routing" u "github.com/ipfs/go-ipfs/util" pset "github.com/ipfs/go-ipfs/util/peerset" todoctr "github.com/ipfs/go-ipfs/util/todocounter" - logging "github.com/ipfs/go-ipfs/vendor/QmQg1J6vikuXF9oDvm4wpdeAUvvkVEKW1EYDw9HhTMnP2b/go-log" + logging "gx/ipfs/QmaPaGNE2GqnfJjRRpQuQuFHuJn4FZvsrGxdik4kgxCkBi/go-log" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" + queue "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer/queue" process "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess" ctxproc "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess/context" - context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" + context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) var maxQueryConcurrency = AlphaValue @@ -90,7 +90,7 @@ func newQueryRunner(q *dhtQuery) *dhtQueryRunner { ctx := ctxproc.OnClosingContext(proc) return &dhtQueryRunner{ query: q, - peersToQuery: queue.NewChanQueue(ctx, queue.NewXORDistancePQ(q.key)), + peersToQuery: queue.NewChanQueue(ctx, queue.NewXORDistancePQ(string(q.key))), peersRemaining: todoctr.NewSyncCounter(), peersSeen: pset.New(), rateLimit: make(chan struct{}, q.concurrency), diff --git a/records.go b/records.go index 49a06d5..18c17de 100644 --- a/records.go +++ b/records.go @@ -5,12 +5,12 @@ import ( "time" ctxfrac "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-context/frac" - "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" - ci "github.com/ipfs/go-ipfs/p2p/crypto" - peer "github.com/ipfs/go-ipfs/p2p/peer" + "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" routing "github.com/ipfs/go-ipfs/routing" pb "github.com/ipfs/go-ipfs/routing/dht/pb" record "github.com/ipfs/go-ipfs/routing/record" + ci "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/crypto" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" ) // MaxRecordAge specifies the maximum time that any node will hold onto a record diff --git a/routing.go b/routing.go index 627c936..85d4638 100644 --- a/routing.go +++ b/routing.go @@ -5,16 +5,16 @@ import ( "sync" "time" - context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" + context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" key "github.com/ipfs/go-ipfs/blocks/key" notif "github.com/ipfs/go-ipfs/notifications" - inet "github.com/ipfs/go-ipfs/p2p/net" - peer "github.com/ipfs/go-ipfs/p2p/peer" "github.com/ipfs/go-ipfs/routing" pb "github.com/ipfs/go-ipfs/routing/dht/pb" kb "github.com/ipfs/go-ipfs/routing/kbucket" record "github.com/ipfs/go-ipfs/routing/record" pset "github.com/ipfs/go-ipfs/util/peerset" + inet "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/net" + peer "gx/ipfs/QmY3NAw959vbE1oJooP9HchcRdBsbxhgQsEZTRhKgvoSuC/go-libp2p/p2p/peer" ) // asyncQueryBuffer is the size of buffered channels in async queries. This