mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-02-10 06:50:15 +08:00
more vendoring
This commit is contained in:
parent
9c398dcbe2
commit
096f68c608
@ -2,7 +2,7 @@
|
|||||||
package addr
|
package addr
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ma "github.com/jbenet/go-multiaddr"
|
ma "QmaA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF/go-multiaddr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AddrSource is a source of addresses. It allows clients to retrieve
|
// AddrSource is a source of addresses. It allows clients to retrieve
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
ma "github.com/jbenet/go-multiaddr"
|
ma "QmaA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF/go-multiaddr"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAddrOrFatal(t *testing.T, s string) ma.Multiaddr {
|
func newAddrOrFatal(t *testing.T, s string) ma.Multiaddr {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
ma "github.com/jbenet/go-multiaddr"
|
ma "QmaA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF/go-multiaddr"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
ma "github.com/jbenet/go-multiaddr"
|
ma "QmaA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF/go-multiaddr"
|
||||||
)
|
)
|
||||||
|
|
||||||
func IDS(t *testing.T, ids string) ID {
|
func IDS(t *testing.T, ids string) ID {
|
||||||
|
6
peer.go
6
peer.go
@ -7,9 +7,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
b58 "github.com/jbenet/go-base58"
|
b58 "QmNsoHoCVhgXcv1Yg45jtkMgimxorTAN36fV9AQMFXHHAQ/go-base58"
|
||||||
ma "github.com/jbenet/go-multiaddr"
|
ma "QmaA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF/go-multiaddr"
|
||||||
mh "github.com/jbenet/go-multihash"
|
mh "QmdeauTdyf38KDQB4Cc4CurPWRRb5pej27NCXPA7kbPTJy/go-multihash"
|
||||||
|
|
||||||
logging "QmWRypnfEwrgH4k93KEHN5hng7VjKYkWmzDYRuTZeh2Mgh/go-log"
|
logging "QmWRypnfEwrgH4k93KEHN5hng7VjKYkWmzDYRuTZeh2Mgh/go-log"
|
||||||
ic "github.com/ipfs/go-libp2p/p2p/crypto"
|
ic "github.com/ipfs/go-libp2p/p2p/crypto"
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
u "util"
|
u "util"
|
||||||
tu "util/testutil"
|
tu "util/testutil"
|
||||||
|
|
||||||
b58 "github.com/jbenet/go-base58"
|
b58 "QmNsoHoCVhgXcv1Yg45jtkMgimxorTAN36fV9AQMFXHHAQ/go-base58"
|
||||||
)
|
)
|
||||||
|
|
||||||
var gen1 keyset // generated
|
var gen1 keyset // generated
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
|
|
||||||
ic "github.com/ipfs/go-libp2p/p2p/crypto"
|
ic "github.com/ipfs/go-libp2p/p2p/crypto"
|
||||||
|
|
||||||
|
ma "QmaA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF/go-multiaddr"
|
||||||
ds "github.com/jbenet/go-datastore"
|
ds "github.com/jbenet/go-datastore"
|
||||||
dssync "github.com/jbenet/go-datastore/sync"
|
dssync "github.com/jbenet/go-datastore/sync"
|
||||||
ma "github.com/jbenet/go-multiaddr"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -7,7 +7,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
peer "github.com/ipfs/go-libp2p/p2p/peer"
|
peer "github.com/ipfs/go-libp2p/p2p/peer"
|
||||||
key "github.com/whyrusleeping/go-key"
|
|
||||||
u "util"
|
u "util"
|
||||||
|
|
||||||
context "golang.org/x/net/context"
|
context "golang.org/x/net/context"
|
||||||
@ -28,7 +27,7 @@ func TestQueue(t *testing.T) {
|
|||||||
// [78 135 26 216 178 181 224 181 234 117 2 248 152 115 255 103 244 34 4 152 193 88 9 225 8 127 216 158 226 8 236 246]
|
// [78 135 26 216 178 181 224 181 234 117 2 248 152 115 255 103 244 34 4 152 193 88 9 225 8 127 216 158 226 8 236 246]
|
||||||
// [125 135 124 6 226 160 101 94 192 57 39 12 18 79 121 140 190 154 147 55 44 83 101 151 63 255 94 179 51 203 241 51]
|
// [125 135 124 6 226 160 101 94 192 57 39 12 18 79 121 140 190 154 147 55 44 83 101 151 63 255 94 179 51 203 241 51]
|
||||||
|
|
||||||
pq := NewXORDistancePQ(key.Key("11140beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a31"))
|
pq := NewXORDistancePQ("11140beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a31")
|
||||||
pq.Enqueue(p3)
|
pq.Enqueue(p3)
|
||||||
pq.Enqueue(p1)
|
pq.Enqueue(p1)
|
||||||
pq.Enqueue(p2)
|
pq.Enqueue(p2)
|
||||||
@ -82,7 +81,7 @@ func TestSyncQueue(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
pq := NewXORDistancePQ(key.Key("11140beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a31"))
|
pq := NewXORDistancePQ("11140beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a31")
|
||||||
cq := NewChanQueue(ctx, pq)
|
cq := NewChanQueue(ctx, pq)
|
||||||
wg := sync.WaitGroup{}
|
wg := sync.WaitGroup{}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user