mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-03-31 14:00:06 +08:00
gx publish 1.4.2
This commit is contained in:
parent
2969d77b0f
commit
5ea1774aba
@ -1 +1 @@
|
|||||||
1.4.1: QmU8iiXVwobZ366qAezD62VDxxnUe9Ss7K2skzYs7vy73B
|
1.4.2: QmekwEJM81TqzKzupMvK68hVNfBNvBengWkpc8nAw2bjBf
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
package addr
|
package addr
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
ma "gx/ipfs/QmSWLfmj5frN9xVLMMN846dMDriy5wN5jeghUm7aTW3DAG/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/multiformats/go-multiaddr"
|
ma "gx/ipfs/QmSWLfmj5frN9xVLMMN846dMDriy5wN5jeghUm7aTW3DAG/go-multiaddr"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newAddrOrFatal(t *testing.T, s string) ma.Multiaddr {
|
func newAddrOrFatal(t *testing.T, s string) ma.Multiaddr {
|
||||||
|
@ -3,9 +3,9 @@ package addr
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
ma "gx/ipfs/QmSWLfmj5frN9xVLMMN846dMDriy5wN5jeghUm7aTW3DAG/go-multiaddr"
|
||||||
manet "github.com/multiformats/go-multiaddr-net"
|
manet "gx/ipfs/QmVCNGTyD4EkvNYaAp253uMQ9Rjsjy2oGMvcdJJUoVRfja/go-multiaddr-net"
|
||||||
mafmt "github.com/whyrusleeping/mafmt"
|
mafmt "gx/ipfs/QmYjJnSTfXWhYL2cV1xFphPqjqowJqH7ZKLA1As8QrPHbn/mafmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
func isFDCostlyTransport(a ma.Multiaddr) bool {
|
func isFDCostlyTransport(a ma.Multiaddr) bool {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
peer "github.com/libp2p/go-libp2p-peer"
|
|
||||||
addr "github.com/libp2p/go-libp2p-peerstore/addr"
|
addr "github.com/libp2p/go-libp2p-peerstore/addr"
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
ma "gx/ipfs/QmSWLfmj5frN9xVLMMN846dMDriy5wN5jeghUm7aTW3DAG/go-multiaddr"
|
||||||
|
peer "gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/libp2p/go-libp2p-peer"
|
ma "gx/ipfs/QmSWLfmj5frN9xVLMMN846dMDriy5wN5jeghUm7aTW3DAG/go-multiaddr"
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
"gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func IDS(t *testing.T, ids string) peer.ID {
|
func IDS(t *testing.T, ids string) peer.ID {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/libp2p/go-libp2p-peer"
|
"gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// LatencyEWMASmooting governs the decay of the EWMA (the speed
|
// LatencyEWMASmooting governs the decay of the EWMA (the speed
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
testutil "github.com/libp2p/go-libp2p-peer/test"
|
testutil "gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLatencyEWMAFun(t *testing.T) {
|
func TestLatencyEWMAFun(t *testing.T) {
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"author": "whyrusleeping",
|
"author": "whyrusleeping",
|
||||||
"hash": "QmQ1FYwmfL2jSvLKeXd6i47cSS23bWVMGqGxeh9nv8xwry",
|
"hash": "QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe",
|
||||||
"name": "go-libp2p-peer",
|
"name": "go-libp2p-peer",
|
||||||
"version": "2.1.1"
|
"version": "2.1.1"
|
||||||
}
|
}
|
||||||
@ -61,6 +61,6 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"name": "go-libp2p-peerstore",
|
"name": "go-libp2p-peerstore",
|
||||||
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
|
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
|
||||||
"version": "1.4.1"
|
"version": "1.4.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ package peerstore
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/libp2p/go-libp2p-peer"
|
ma "gx/ipfs/QmSWLfmj5frN9xVLMMN846dMDriy5wN5jeghUm7aTW3DAG/go-multiaddr"
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
"gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PeerInfo is a small struct used to pass around a peer with
|
// PeerInfo is a small struct used to pass around a peer with
|
||||||
|
@ -3,8 +3,8 @@ package peerstore
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
peer "github.com/libp2p/go-libp2p-peer"
|
ma "gx/ipfs/QmSWLfmj5frN9xVLMMN846dMDriy5wN5jeghUm7aTW3DAG/go-multiaddr"
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
peer "gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func mustAddr(t *testing.T, s string) ma.Multiaddr {
|
func mustAddr(t *testing.T, s string) ma.Multiaddr {
|
||||||
|
@ -7,13 +7,13 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
ic "github.com/libp2p/go-libp2p-crypto"
|
ic "gx/ipfs/QmTuX6VtWTbWgPwd5PMXHyp411RKsW5nBqLKVVRfJMNneb/go-libp2p-crypto"
|
||||||
|
|
||||||
//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"
|
||||||
logging "github.com/ipfs/go-log"
|
ma "gx/ipfs/QmSWLfmj5frN9xVLMMN846dMDriy5wN5jeghUm7aTW3DAG/go-multiaddr"
|
||||||
"github.com/libp2p/go-libp2p-peer"
|
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
"gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.Logger("peerstore")
|
var log = logging.Logger("peerstore")
|
||||||
|
@ -8,8 +8,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
peer "github.com/libp2p/go-libp2p-peer"
|
ma "gx/ipfs/QmSWLfmj5frN9xVLMMN846dMDriy5wN5jeghUm7aTW3DAG/go-multiaddr"
|
||||||
ma "github.com/multiformats/go-multiaddr"
|
peer "gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getAddrs(t *testing.T, n int) []ma.Multiaddr {
|
func getAddrs(t *testing.T, n int) []ma.Multiaddr {
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"math/big"
|
"math/big"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
peer "github.com/libp2p/go-libp2p-peer"
|
ks "gx/ipfs/QmUusaX99BZoELh7dmPgirqRQ1FAmMnmnBn3oiqDFGBUSc/go-keyspace"
|
||||||
ks "github.com/whyrusleeping/go-keyspace"
|
peer "gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// peerMetric tracks a peer and its distance to something else.
|
// peerMetric tracks a peer and its distance to something else.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package queue
|
package queue
|
||||||
|
|
||||||
import peer "github.com/libp2p/go-libp2p-peer"
|
import peer "gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
|
|
||||||
// PeerQueue maintains a set of peers ordered according to a metric.
|
// PeerQueue maintains a set of peers ordered according to a metric.
|
||||||
// Implementations of PeerQueue could order peers based on distances along
|
// Implementations of PeerQueue could order peers based on distances along
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
u "github.com/ipfs/go-ipfs-util"
|
u "gx/ipfs/QmZuY8aV7zbNXVy6DyN9SmnuH3o9nG852F4aTiSBpts8d1/go-ipfs-util"
|
||||||
peer "github.com/libp2p/go-libp2p-peer"
|
peer "gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestQueue(t *testing.T) {
|
func TestQueue(t *testing.T) {
|
||||||
|
@ -3,8 +3,8 @@ package queue
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
logging "github.com/ipfs/go-log"
|
logging "gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
|
||||||
peer "github.com/libp2p/go-libp2p-peer"
|
peer "gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log = logging.Logger("peerqueue")
|
var log = logging.Logger("peerqueue")
|
||||||
|
@ -3,9 +3,9 @@ package testutil
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
u "github.com/ipfs/go-ipfs-util"
|
ci "gx/ipfs/QmTuX6VtWTbWgPwd5PMXHyp411RKsW5nBqLKVVRfJMNneb/go-libp2p-crypto"
|
||||||
ci "github.com/libp2p/go-libp2p-crypto"
|
u "gx/ipfs/QmZuY8aV7zbNXVy6DyN9SmnuH3o9nG852F4aTiSBpts8d1/go-ipfs-util"
|
||||||
peer "github.com/libp2p/go-libp2p-peer"
|
peer "gx/ipfs/QmbKtZxyDqUJp7Ad8tGr5nrLqoi9nfgqFxcNbmLJbfaHPe/go-libp2p-peer"
|
||||||
)
|
)
|
||||||
|
|
||||||
func RandPeerID() (peer.ID, error) {
|
func RandPeerID() (peer.ID, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user