error: Clone DialError
for better error reporting to installed protocols #261
Open
Description
The transport manager receives a DialFailure { error: DialError }
on dial failures.
Because the DialError
does not implement Clone, the installed protocols receive only a DialFailure { peer, address }
without details about the failure.
Implement Clone
for the DialError
to propagate more information to installed protocols.
This aims to improve the error details provided to substrate, especially regarding substream open errors:
TRACE tokio-runtime-worker sub-libp2p::peerset: /b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe/transactions/1: failed to open substream to PeerId("12D3KooWQKqane1SqWJNWMQkbia9qiMWXkcHtAdfW5eVF8hbwEDw"): DialFailure
TRACE tokio-runtime-worker sub-libp2p::peerset: /b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe/transactions/1: failed to open substream to PeerId("12D3KooWMRUgWaDJEqAhhoCg81Yhwrs9DxLLYscJDTsE4sk2Srnj"): DialFailure
...
Event received by the TransportManager
:
litep2p/src/transport/manager/mod.rs
Line 1535 in b967de3
Event sent to protocols without error details:
litep2p/src/transport/manager/mod.rs
Lines 1582 to 1585 in b967de3