Call NetworkService::add_known_address before sending a request (#2726)

* Call NetworkService::add_known_address before sending a request

* Better doc

* Update Substrate

* Update Substrate

* Restore the import 🤷‍♀️ I don't know why it compiles locally

* imports correctly

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
Pierre KriegerandRobert Habermeier authored and GitHub committed 2021-03-28 16:01:49 +00:00
1 parent 5952e790fa
commit e3dc9024ce
3 files changed
+32 -20

No files matched your search

@@ -90,6 +90,12 @@ pub enum Recipient {
///
/// The network implementation will make use of that sender for informing the requesting subsystem
/// about responses/errors.
///
/// When using `Recipient::Peer`, keep in mind that no address (as in IP address and port) might
/// be known for that specific peer. You are encouraged to use `Peer` for peers that you are
/// expected to be already connected to.
/// When using `Recipient::Authority`, the addresses can be found thanks to the authority
/// discovery system.
#[derive(Debug)]
pub struct OutgoingRequest<Req> {
/// Intendent recipient of this request.