-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: when creating dial targets, encapsulate PeerIds last (#1389)
It turns out because `Multiaddr.encapsulate` stringifies the `Multiaddr` it's a [suprisingly expensive operation](multiformats/js-multiaddr#275 (comment)) so here we switch the order of our `Multiaddr` pipeline around so we filter undialable addresses (e.g. unsupported transports etc) before encapsulating the `PeerId` onto a `Multiaddr` we'd then just ignore.
- Loading branch information
1 parent
3f57eda
commit ec02351
Showing
1 changed file
with
14 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters