@libp2p/peer-store 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/address-book.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/peer-store",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Stores information about peers libp2p knows on the network",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-peer-store#readme",
|
package/src/address-book.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type { AddressFilter, Peer, PeerMultiaddrsChangeData, PeerStore } from '@
|
|
|
14
14
|
import type { Store } from './store.js'
|
|
15
15
|
import type { Envelope } from '@libp2p/interfaces/record'
|
|
16
16
|
import type { PeerId } from '@libp2p/interfaces/peer-id'
|
|
17
|
-
import type {
|
|
17
|
+
import type { PeerInfo } from '@libp2p/interfaces/peer-info'
|
|
18
18
|
|
|
19
19
|
const log = logger('libp2p:peer-store:address-book')
|
|
20
20
|
const EVENT_NAME = 'change:multiaddrs'
|
|
@@ -228,7 +228,7 @@ export class PeerStoreAddressBook {
|
|
|
228
228
|
|
|
229
229
|
// Notify the existence of a new peer
|
|
230
230
|
if (!hasPeer) {
|
|
231
|
-
this.dispatchEvent(new CustomEvent<
|
|
231
|
+
this.dispatchEvent(new CustomEvent<PeerInfo>('peer', {
|
|
232
232
|
detail: {
|
|
233
233
|
id: peerId,
|
|
234
234
|
multiaddrs: updatedPeer.addresses.map(addr => addr.multiaddr),
|
|
@@ -296,7 +296,7 @@ export class PeerStoreAddressBook {
|
|
|
296
296
|
|
|
297
297
|
// Notify the existence of a new peer
|
|
298
298
|
if (hasPeer === true) {
|
|
299
|
-
this.dispatchEvent(new CustomEvent<
|
|
299
|
+
this.dispatchEvent(new CustomEvent<PeerInfo>('peer', {
|
|
300
300
|
detail: {
|
|
301
301
|
id: peerId,
|
|
302
302
|
multiaddrs: updatedPeer.addresses.map(addr => addr.multiaddr),
|