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 Krieger
2021-03-28 18:01:49 +02:00
committed by GitHub
parent 5952e790fa
commit e3dc9024ce
3 changed files with 32 additions and 20 deletions
@@ -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.