mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-14 01:31:22 +00:00
fix: address book guarantees no replicated entries are added (#927)
This commit is contained in:
@ -287,6 +287,14 @@ describe('addressBook', () => {
|
||||
|
||||
await defer.promise
|
||||
})
|
||||
|
||||
it('does not add replicated content', () => {
|
||||
// set 1
|
||||
ab.set(peerId, [addr1, addr1])
|
||||
|
||||
const addresses = ab.get(peerId)
|
||||
expect(addresses).to.have.lengthOf(1)
|
||||
})
|
||||
})
|
||||
|
||||
describe('addressBook.get', () => {
|
||||
|
Reference in New Issue
Block a user