Skip to content

Commit

Permalink
chore: apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
  • Loading branch information
vasco-santos and jacobheun committed Aug 27, 2020
1 parent cd09327 commit 9107efe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ peerStore.addressBook.getMultiaddrsForPeer(peerId)

Set known `multiaddrs` of a given peer. This will replace previously stored multiaddrs, if available.
Replacing stored multiaddrs might result in losing obtained certified addresses, which is not desirable.
Consider using `addressBook.add()` if you're not sure this is what you want to do.

`peerStore.addressBook.set(peerId, multiaddrs)`

Expand Down
1 change: 1 addition & 0 deletions src/peer-store/address-book.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ class AddressBook extends Book {
* Set known multiaddrs of a provided peer.
* This will replace previously stored multiaddrs, if available.
* Replacing stored multiaddrs might result in losing obtained certified addresses.
* If you are not sure, it's recommended to use `add` instead.
* @override
* @param {PeerId} peerId
* @param {Array<Multiaddr>} multiaddrs
Expand Down

0 comments on commit 9107efe

Please sign in to comment.