Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
f11291cd
Commit
f11291cd
authored
5 years ago
by
Pierre Krieger
Committed by
Gavin Wood
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove support for mplex (#3312)
parent
b5cd3628
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
substrate/core/network/src/lib.rs
+0
-2
0 additions, 2 deletions
substrate/core/network/src/lib.rs
substrate/core/network/src/transport.rs
+3
-6
3 additions, 6 deletions
substrate/core/network/src/transport.rs
with
3 additions
and
8 deletions
substrate/core/network/src/lib.rs
+
0
−
2
View file @
f11291cd
...
...
@@ -89,8 +89,6 @@
//!
//! The following multiplexing protocols are supported:
//!
//! - [Mplex](https://github.com/libp2p/specs/tree/master/mplex). Support for mplex will likely
//! be deprecated in the future.
//! - [Yamux](https://github.com/hashicorp/yamux/blob/master/spec.md).
//!
//! ## Substreams
...
...
This diff is collapsed.
Click to expand it.
substrate/core/network/src/transport.rs
+
3
−
6
View file @
f11291cd
...
...
@@ -17,14 +17,14 @@
use
futures
::
prelude
::
*
;
use
libp2p
::{
InboundUpgradeExt
,
OutboundUpgradeExt
,
PeerId
,
Transport
,
mplex
,
identity
,
secio
,
yamux
,
bandwidth
,
wasm_ext
identity
,
secio
,
yamux
,
bandwidth
,
wasm_ext
};
#[cfg(not(target_os
=
"unknown"
))]
use
libp2p
::{
tcp
,
dns
,
websocket
,
noise
};
#[cfg(not(target_os
=
"unknown"
))]
use
libp2p
::
core
::{
upgrade
,
either
::
EitherError
,
either
::
EitherOutput
};
use
libp2p
::
core
::{
self
,
transport
::
boxed
::
Boxed
,
transport
::
OptionalTransport
,
muxing
::
StreamMuxerBox
};
use
std
::{
io
,
sync
::
Arc
,
time
::
Duration
,
usize
};
use
std
::{
io
,
sync
::
Arc
,
time
::
Duration
};
pub
use
self
::
bandwidth
::
BandwidthSinks
;
...
...
@@ -55,9 +55,6 @@ pub fn build_transport(
let
secio_config
=
secio
::
SecioConfig
::
new
(
keypair
);
// Build configuration objects for multiplexing mechanisms.
let
mut
mplex_config
=
mplex
::
MplexConfig
::
new
();
mplex_config
.max_buffer_len_behaviour
(
mplex
::
MaxBufferBehaviour
::
Block
);
mplex_config
.max_buffer_len
(
usize
::
MAX
);
let
yamux_config
=
yamux
::
Config
::
default
();
// Build the base layer of the transport.
...
...
@@ -116,7 +113,7 @@ pub fn build_transport(
// Multiplexing
let
transport
=
transport
.and_then
(
move
|(
stream
,
peer_id
),
endpoint
|
{
let
peer_id2
=
peer_id
.clone
();
let
upgrade
=
core
::
upgrade
::
SelectUpgrade
::
new
(
yamux_config
,
mplex_config
)
let
upgrade
=
yamux_config
.map_inbound
(
move
|
muxer
|
(
peer_id
,
muxer
))
.map_outbound
(
move
|
muxer
|
(
peer_id2
,
muxer
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment