Browse Source

extract from 0.4.0

pull/1667/head
Jeromy 9 years ago
parent
commit
9604eaef7d
  1. 2
      p2p/host/peerstore/addr/addrsrcs.go
  2. 2
      p2p/host/peerstore/addr/addrsrcs_test.go
  3. 2
      p2p/host/peerstore/addr_manager.go
  4. 2
      p2p/host/peerstore/addr_manager_test.go
  5. 2
      p2p/host/peerstore/metrics_test.go
  6. 10
      p2p/host/peerstore/peer.go
  7. 6
      p2p/host/peerstore/peer_test.go
  8. 6
      p2p/host/peerstore/peerstore.go
  9. 4
      p2p/host/peerstore/queue/distance.go
  10. 6
      p2p/host/peerstore/queue/queue_test.go
  11. 4
      p2p/host/peerstore/queue/sync.go

2
p2p/host/peerstore/addr/addrsrcs.go

@ -2,7 +2,7 @@
package addr
import (
ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma "github.com/jbenet/go-multiaddr"
)
// AddrSource is a source of addresses. It allows clients to retrieve

2
p2p/host/peerstore/addr/addrsrcs_test.go

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma "github.com/jbenet/go-multiaddr"
)
func newAddrOrFatal(t *testing.T, s string) ma.Multiaddr {

2
p2p/host/peerstore/addr_manager.go

@ -4,7 +4,7 @@ import (
"sync"
"time"
ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma "github.com/jbenet/go-multiaddr"
)
const (

2
p2p/host/peerstore/addr_manager_test.go

@ -4,7 +4,7 @@ import (
"testing"
"time"
ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ma "github.com/jbenet/go-multiaddr"
)
func IDS(t *testing.T, ids string) ID {

2
p2p/host/peerstore/metrics_test.go

@ -6,8 +6,8 @@ import (
"testing"
"time"
testutil "github.com/ipfs/go-ipfs/util/testutil"
peer "github.com/ipfs/go-libp2p/p2p/peer"
testutil "util/testutil"
)
func TestLatencyEWMAFun(t *testing.T) {

10
p2p/host/peerstore/peer.go

@ -7,13 +7,13 @@ import (
"fmt"
"strings"
b58 "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-base58"
ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
b58 "github.com/jbenet/go-base58"
ma "github.com/jbenet/go-multiaddr"
mh "github.com/jbenet/go-multihash"
u "github.com/ipfs/go-ipfs/util"
logging "github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
logging "QmWRypnfEwrgH4k93KEHN5hng7VjKYkWmzDYRuTZeh2Mgh/go-log"
ic "github.com/ipfs/go-libp2p/p2p/crypto"
u "util"
)
var log = logging.Logger("peer")

6
p2p/host/peerstore/peer_test.go

@ -6,12 +6,12 @@ import (
"strings"
"testing"
u "github.com/ipfs/go-ipfs/util"
tu "github.com/ipfs/go-ipfs/util/testutil"
ic "github.com/ipfs/go-libp2p/p2p/crypto"
. "github.com/ipfs/go-libp2p/p2p/peer"
u "util"
tu "util/testutil"
b58 "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-base58"
b58 "github.com/jbenet/go-base58"
)
var gen1 keyset // generated

6
p2p/host/peerstore/peerstore.go

@ -7,9 +7,9 @@ import (
ic "github.com/ipfs/go-libp2p/p2p/crypto"
ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
dssync "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync"
ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
ds "github.com/jbenet/go-datastore"
dssync "github.com/jbenet/go-datastore/sync"
ma "github.com/jbenet/go-multiaddr"
)
const (

4
p2p/host/peerstore/queue/distance.go

@ -5,9 +5,9 @@ import (
"math/big"
"sync"
key "github.com/ipfs/go-ipfs/blocks/key"
ks "github.com/ipfs/go-ipfs/routing/keyspace"
ks "Qma4vHVBYKDiKS5VpvtLNJHHDbL7S6VRsvxxmBnBFfKP3k/go-keyspace"
peer "github.com/ipfs/go-libp2p/p2p/peer"
key "github.com/whyrusleeping/go-key"
)
// peerMetric tracks a peer and its distance to something else.

6
p2p/host/peerstore/queue/queue_test.go

@ -6,11 +6,11 @@ import (
"testing"
"time"
key "github.com/ipfs/go-ipfs/blocks/key"
u "github.com/ipfs/go-ipfs/util"
peer "github.com/ipfs/go-libp2p/p2p/peer"
key "github.com/whyrusleeping/go-key"
u "util"
context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
context "golang.org/x/net/context"
)
func TestQueue(t *testing.T) {

4
p2p/host/peerstore/queue/sync.go

@ -1,9 +1,9 @@
package queue
import (
context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
logging "github.com/ipfs/go-ipfs/vendor/go-log-v1.0.0"
context "golang.org/x/net/context"
peer "github.com/ipfs/go-libp2p/p2p/peer"
logging "QmWRypnfEwrgH4k93KEHN5hng7VjKYkWmzDYRuTZeh2Mgh/go-log"
)
var log = logging.Logger("peerqueue")

Loading…
Cancel
Save