Browse Source

gx: update go-libp2p-peerstore

pull/420/head
Steven Allen 6 years ago
parent
commit
c46e8d6e36
  1. 4
      defaults.go
  2. 3
      p2p/net/mock/mock_net.go
  3. 60
      package.json

4
defaults.go

@ -6,7 +6,7 @@ import (
"crypto/rand"
crypto "github.com/libp2p/go-libp2p-crypto"
pstore "github.com/libp2p/go-libp2p-peerstore"
pstoremem "github.com/libp2p/go-libp2p-peerstore/pstoremem"
secio "github.com/libp2p/go-libp2p-secio"
tcp "github.com/libp2p/go-tcp-transport"
ws "github.com/libp2p/go-ws-transport"
@ -41,7 +41,7 @@ var DefaultTransports = ChainOptions(
// DefaultPeerstore configures libp2p to use the default peerstore.
var DefaultPeerstore Option = func(cfg *Config) error {
return cfg.Apply(Peerstore(pstore.NewPeerstore()))
return cfg.Apply(Peerstore(pstoremem.NewPeerstore()))
}
// RandomIdentity generates a random identity (default behaviour)

3
p2p/net/mock/mock_net.go

@ -16,6 +16,7 @@ import (
p2putil "github.com/libp2p/go-libp2p-netutil"
peer "github.com/libp2p/go-libp2p-peer"
pstore "github.com/libp2p/go-libp2p-peerstore"
pstoremem "github.com/libp2p/go-libp2p-peerstore/pstoremem"
testutil "github.com/libp2p/go-testutil"
ma "github.com/multiformats/go-multiaddr"
)
@ -70,7 +71,7 @@ func (mn *mocknet) AddPeer(k ic.PrivKey, a ma.Multiaddr) (host.Host, error) {
return nil, err
}
ps := pstore.NewPeerstore()
ps := pstoremem.NewPeerstore()
ps.AddAddr(p, a, pstore.PermanentAddrTTL)
ps.AddPrivKey(p, k)
ps.AddPubKey(p, k.GetPublic())

60
package.json

@ -61,27 +61,27 @@
},
{
"author": "whyrusleeping",
"hash": "QmWri2HWdxHjWBUermhWy7QWJqN1cV8Gd1QbDiB5m86f1H",
"hash": "QmReYSQGHjf28pKf93FwyD72mLXoZo94MB2Cq6VBSUHvFB",
"name": "go-libp2p-secio",
"version": "2.0.8"
"version": "2.0.9"
},
{
"author": "whyrusleeping",
"hash": "QmeKD8YT7887Xu6Z86iZmpYNxrLogJexqxEugSmaf14k64",
"hash": "Qmda4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6",
"name": "go-libp2p-peerstore",
"version": "1.4.24"
"version": "2.0.0"
},
{
"author": "whyrusleeping",
"hash": "QmcDUyb52N62J8ZamGgUWUyWc1MtuCBce7WFA4D9xA6cwF",
"hash": "QmU129xU8dM79BgR97hu4fsiUDkTQrNHbzkiYfyrkNci8o",
"name": "go-libp2p-transport",
"version": "3.0.8"
"version": "3.0.9"
},
{
"author": "whyrusleeping",
"hash": "Qmcw9fndogcYwyGs4a5TPDbnZPBLxvtrBZzpvyyVDzxDWT",
"hash": "QmV8KW6eBanaxCxGNrXx8Q3fZUqvumCz2Hwd2FGpb3vzYC",
"name": "go-tcp-transport",
"version": "2.0.8"
"version": "2.0.9"
},
{
"author": "whyrusleeping",
@ -103,9 +103,9 @@
},
{
"author": "whyrusleeping",
"hash": "QmQSbtGXCyNrj34LWL8EgXyNNYDZ8r3SwQcpW5pPxVhLnM",
"hash": "QmZNJyx9GGCX4GeuHnLB8fxaxMLs4MjTjHokxfQcCd6Nve",
"name": "go-libp2p-net",
"version": "3.0.8"
"version": "3.0.9"
},
{
"author": "whyrusleeping",
@ -115,15 +115,15 @@
},
{
"author": "whyrusleeping",
"hash": "QmfH9FKYv3Jp1xiyL8sPchGBUBg6JA6XviwajAo3qgnT3B",
"hash": "QmeMYW7Nj8jnnEfs9qhm7SxKkoDPUWXu3MsxX6BFwz34tf",
"name": "go-libp2p-host",
"version": "3.0.8"
"version": "3.0.9"
},
{
"author": "whyrusleeping",
"hash": "Qmcc5CPuKyfDZNmqXNkk6j23CyZqZGypUv952NLHYGbeni",
"hash": "QmeDpqUwwdye8ABKVMPXKuWwPVURFdqTqssbTUB39E2Nwd",
"name": "go-libp2p-swarm",
"version": "3.0.10"
"version": "3.0.11"
},
{
"author": "whyrusleeping",
@ -133,15 +133,15 @@
},
{
"author": "whyrusleeping",
"hash": "QmXeofKUbQf6diwT12ZmpmAjW9c47aXT43t7qG1bGTRQTj",
"hash": "QmfDapjsRAfzVpjeEm2tSmX19QpCrkLDXRCDDWJcbbUsFn",
"name": "go-libp2p-netutil",
"version": "0.4.6"
"version": "0.4.7"
},
{
"author": "whyrusleeping",
"hash": "QmeKQeTT46oH3ezWeNLLaa8RtFbvijmxtyRiRuQD5wASDk",
"hash": "QmQ4bjZSEC5drCRqssuXRymCswHPmW3Z46ibgBtg9XGd34",
"name": "go-libp2p-blankhost",
"version": "0.3.8"
"version": "0.3.9"
},
{
"author": "whyrusleeping",
@ -169,9 +169,9 @@
},
{
"author": "vyzo",
"hash": "QmUveY3vGb6uQuzccihinJshn3KUFjvb5PaBZUVhqGx8TJ",
"hash": "QmWX6RySJ3yAYmfjLSw1LtRZnDh5oVeA9kM3scNQJkysqa",
"name": "go-libp2p-circuit",
"version": "2.1.11"
"version": "2.2.1"
},
{
"author": "lgierth",
@ -181,9 +181,9 @@
},
{
"author": "why",
"hash": "QmVz2p8ZVZ5GcWPNWGs2HZHiZyHumZcJpQdMRpxkMDhc2C",
"hash": "QmWGGN1nysi1qgqto31bENwESkmZBY4YGK4sZC3qhnqhSv",
"name": "go-libp2p-interface-connmgr",
"version": "0.0.14"
"version": "0.0.15"
},
{
"author": "whyrusleeping",
@ -193,21 +193,21 @@
},
{
"author": "whyrusleeping",
"hash": "QmSQhZyqoEepHPHr6kCpAoYVHzvVkTHAAXnNqFEFbVaaQr",
"hash": "Qmewujzx2quBisChBARfNDsMjTgUgs8qMkvCercSPQPLur",
"name": "go-ws-transport",
"version": "2.0.8"
"version": "2.0.9"
},
{
"author": "stebalien",
"hash": "Qmd4VzS3T7ckhHcLCpWwgVMYe6RcKhYjNKfy1g7LJ5myjv",
"hash": "QmPGWMxTWBJwfH1dJo4J7eV4Fgpzb9gukPRkeEN1ycAkNu",
"name": "go-conn-security-multistream",
"version": "0.1.8"
"version": "0.1.9"
},
{
"author": "Stebalien",
"hash": "QmNPQvc3jUA7L6oHB8en9PittPGazFMdoveN2oycHL6yWF",
"hash": "QmXaH5S5aHmbYyKSTMQDhWX8LzXfX91VGQFxaMdCuTUgBv",
"name": "go-conn-security",
"version": "0.1.8"
"version": "0.1.9"
},
{
"author": "libp2p",
@ -223,9 +223,9 @@
},
{
"author": "steb",
"hash": "QmefQrpDSYX6jQRtUyhcASFVBDkoAsDTPXemyxGMzA3phK",
"hash": "QmWRcKvbFVND1vSTJZv5imdBxmkj9FFJ5Jku1qWxasAAMo",
"name": "go-libp2p-transport-upgrader",
"version": "0.1.8"
"version": "0.1.9"
},
{
"hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8",

Loading…
Cancel
Save