chore: use listening events to create self peer record on updates

This commit is contained in:
Vasco Santos
2020-09-23 13:14:53 +02:00
parent c22508c3e4
commit fba9457011
7 changed files with 63 additions and 34 deletions

View File

@ -73,6 +73,7 @@
* [`libp2p`](#libp2p)
* [`libp2p.connectionManager`](#libp2pconnectionmanager)
* [`libp2p.peerStore`](#libp2ppeerStore)
* [`libp2p.transportManager`](#libp2ptransportmanager)
* [Types](#types)
* [`Stats`](#stats)
@ -2019,6 +2020,14 @@ This event will be triggered anytime we are disconnected from another peer, rega
- `peerId`: instance of [`PeerId`][peer-id]
- `protocols`: array of known, supported protocols for the peer (string identifiers)
### libp2p.transportManager
#### Listening addresses change
This event will be triggered anytime the listening addresses change.
`libp2p.transportManager.on('listening', () => {})`
## Types
### Stats