mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-05-24 08:01:21 +00:00
add/update lastSeen to a peer once a stream is open
This commit is contained in:
parent
648eb7c666
commit
02e07993da
@ -72,6 +72,18 @@ experiment('BASE', function () {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
test('Check for lastSeen', function (done) {
|
||||||
|
var protocol = '/sparkles/3.3.3'
|
||||||
|
|
||||||
|
swarmB.registerHandler(protocol, function (stream) {})
|
||||||
|
|
||||||
|
swarmA.openStream(peerB, protocol, function (err, stream) {
|
||||||
|
expect(err).to.not.be.instanceof(Error)
|
||||||
|
expect(peerB.lastSeen).to.be.instanceof(Date)
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
experiment('IDENTIFY', function () {
|
experiment('IDENTIFY', function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user