improve efficiency of propagating address failures#443
improve efficiency of propagating address failures#443dharjeezy wants to merge 9 commits intoparitytech:masterfrom
Conversation
src/transport/manager/mod.rs
Outdated
| let adresses = context.dial_failure_addresses(&[address.clone()]); | ||
|
|
||
| match context.tx.try_send(make_dial_failure_event(peer, adresses.clone())) { |
There was a problem hiding this comment.
nit: Is there a way to avoid the cloning here? Maybe changing the signature of the fn to take a & Multiaddr?
I would also inline the make_dial_failure_event:
match context.tx.try_send(InnerTransportEvent::DialFailure { peer, addresses })Instead of cloning the addreses here (addresses.clone()), we could recreate the addresses on error
There was a problem hiding this comment.
i have changed to this inline way, but can't still do without cloning
lexnv
left a comment
There was a problem hiding this comment.
Looks good to me! Thanks again for contributing 🙏
| peer, | ||
| addresses: vec![address.clone()], | ||
| }) | ||
| .send(InnerTransportEvent::DialFailure { peer, addresses }) |
There was a problem hiding this comment.
@dharjeezy Can you also add to the doc of InnerTransportEvent & TransportEvent that addresses is only forwarded if the protocol was registered with DialFailureAddresses::Required, please?
There was a problem hiding this comment.
this is done now @dmitry-markin. can we merge it in now?
…i/dial-up-addresses
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
|
@lexnv can we please get this merged? |
closes #409