Alex Potsides 45c33675a7
fix: store multiaddrs during content and peer routing queries (#865)
* fix: store provider multiaddrs during find providers

Changes the behaviour of `libp2p.contentRouting.findProviders` to store
the multiaddrs reported by the routers before yielding results to
the caller, so when they try to dial the provider, the multiaddrs are
already in the peer store's address book.

Also dedupes providers reported by routers but keeps all of the addresses
reported, even for duplicates.

Also, also fixes a performance bug where the previous implementation would
wait for any router to completely finish finding providers before sending
any results to the caller.  It'll now yield results as they come in which
makes it much, much faster.
2021-01-21 13:41:27 +01:00
..
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00
2020-12-16 13:56:41 +01:00