Merge branch 'master' into feat/pstore-ds-gc

This commit is contained in:
Raúl Kripalani 2019-02-05 16:15:11 +00:00
commit 0baddf577e
5 changed files with 28 additions and 11 deletions

View File

@ -1 +1 @@
2.0.11: QmQAGG1zxfePqj2t7bLxyN8AFccZ889DDR9Gn8kVLDrGZo
2.0.13: QmPiemjiKBC9VA7vZF82m4x1oygtg2c2YVqag8PX7dN1BD

View File

@ -26,7 +26,7 @@ This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/c
### Want to hack on IPFS?
[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)
[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)
## License
MIT

View File

@ -15,9 +15,9 @@
},
{
"author": "whyrusleeping",
"hash": "QmRKLtwMw131aK7ugC3G7ybpumMz78YrJe5dzneyindvG1",
"hash": "QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc",
"name": "go-multiaddr",
"version": "1.3.6"
"version": "1.4.0"
},
{
"author": "whyrusleeping",
@ -33,21 +33,21 @@
},
{
"author": "jbenet",
"hash": "QmQVUtnrNGtCRkCMpXgpApfzQjc8FDaDVxHqWH8cnZQeh5",
"hash": "QmZcLBXKaFe8ND5YHPkJRAwmhJGrVsi1JqDZNyJ4nRK5Mj",
"name": "go-multiaddr-net",
"version": "1.6.6"
"version": "1.7.1"
},
{
"author": "whyrusleeping",
"hash": "QmXZVrmSiWPyuET6BMbGK3PjzVnQBrcnYc4GkHKhK2KXLp",
"hash": "QmYW5GSNZboYmtWWhzYr4yS3WDAuettAMh3iDLn5nGvwtc",
"name": "mafmt",
"version": "1.2.9"
"version": "1.2.10"
},
{
"author": "whyrusleeping",
"hash": "QmcqU6QUDSXprb1518vYDGczrTJTyGwLG9eUa5iNX4xUtS",
"hash": "QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY",
"name": "go-libp2p-peer",
"version": "2.4.3"
"version": "3.0.0"
},
{
"author": "multiformats",
@ -95,6 +95,6 @@
"license": "MIT",
"name": "go-libp2p-peerstore",
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
"version": "2.0.11"
"version": "2.0.13"
}

View File

@ -88,6 +88,21 @@ func testAddAddress(ab pstore.AddrBook) func(*testing.T) {
time.Sleep(1200 * time.Millisecond)
testHas(t, addrs[2:], ab.Addrs(id))
})
t.Run("adding an existing address with an earlier expiration is noop", func(t *testing.T) {
id := generatePeerIds(1)[0]
addrs := generateAddrs(3)
ab.AddAddrs(id, addrs, time.Hour)
// same address as before but with a lower TTL
ab.AddAddrs(id, addrs[2:], time.Second)
// after the initial TTL has expired, check that all three addresses are still present (i.e. the TTL on
// the modified one was not shortened).
time.Sleep(2100 * time.Millisecond)
testHas(t, addrs, ab.Addrs(id))
})
}
}

View File

@ -140,6 +140,8 @@ func testKeyBookPeers(kb pstore.KeyBook) func(t *testing.T) {
func testInlinedPubKeyAddedOnRetrieve(kb pstore.KeyBook) func(t *testing.T) {
return func(t *testing.T) {
t.Skip("key inlining disabled for now: see libp2p/specs#111")
if peers := kb.PeersWithKeys(); len(peers) > 0 {
t.Error("expected peers to be empty on init")
}