Skip to content

Commit 3d6c5a8

Browse files
chore: apply suggestions from code review
Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
1 parent 7039cd0 commit 3d6c5a8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class Libp2p extends EventEmitter {
267267
}
268268

269269
/**
270-
* Dials to the provided peer. If successful, the known `Peer` data of the
270+
* Dials to the provided peer. If successful, the known metadata of the
271271
* peer will be added to the nodes `peerStore`
272272
* @param {PeerId|Multiaddr|string} peer The peer to dial
273273
* @param {object} options
@@ -280,7 +280,7 @@ class Libp2p extends EventEmitter {
280280

281281
/**
282282
* Dials to the provided peer and handshakes with the given protocol.
283-
* If successful, the known `Peer` data of the peer will be added to the nodes `peerStore`,
283+
* If successful, the known metadata of the peer will be added to the nodes `peerStore`,
284284
* and the `Connection` will be returned
285285
* @async
286286
* @param {PeerId|Multiaddr|string} peer The peer to dial
@@ -422,7 +422,7 @@ class Libp2p extends EventEmitter {
422422
* Called whenever peer discovery services emit `peer` events.
423423
* Known peers may be emitted.
424424
* @private
425-
* @param {PeerDara} peer
425+
* @param {{ id: PeerId, multiaddrs: Array<Multiaddr>, protocols: Array<string> }} peer
426426
*/
427427
_onDiscoveryPeer (peer) {
428428
if (peer.id.toB58String() === this.peerId.toB58String()) {

src/peer-store/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The `addressBook` keeps the known multiaddrs of a peer. The multiaddrs of each p
4242

4343
`Map<string, Address>`
4444

45-
A `peerId.toString()` identifier mapping to a `Address` object, which should have the following structure:
45+
A `peerId.toString()` identifier mapping to an `Address` object, which should have the following structure:
4646

4747
```js
4848
{

0 commit comments

Comments
 (0)