Dialing peers is expensive, as are peer routing queries. Dials can be rejected due to configuration (no transport, connection gating, etc) - if a user is in the middle of a routing query they may wish to test dialability and continue the query instead of assuming they've found a dialable peer.
Adds an isDialable method to libp2p that given one or more multiaddrs, allows testing them to ensure libp2p won't immediately reject the dial attempt due to how the node has been configured.
Change checklist
[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation if necessary (this includes comments as well)
[x] I have added tests that prove my fix is effective or that my feature works
Dialing peers is expensive, as are peer routing queries. Dials can be rejected due to configuration (no transport, connection gating, etc) - if a user is in the middle of a routing query they may wish to test dialability and continue the query instead of assuming they've found a dialable peer.
Adds an
isDialable
method to libp2p that given one or more multiaddrs, allows testing them to ensure libp2p won't immediately reject the dial attempt due to how the node has been configured.Change checklist