Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Martin Pugh
polkadot
Commits
550d84a8
Unverified
Commit
550d84a8
authored
Dec 02, 2020
by
Andronik Ordian
Committed by
GitHub
Dec 02, 2020
Browse files
remove unused code (#2058)
parent
cab6c7b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
node/network/collator-protocol/src/collator_side.rs
View file @
550d84a8
...
...
@@ -691,7 +691,7 @@ pub(crate) async fn run(
loop
{
select!
{
res
=
state
.connection_requests
.next
()
.fuse
()
=>
{
res
=
state
.connection_requests
.next
()
=>
{
let
(
relay_parent
,
validator_id
,
peer_id
)
=
match
res
{
Some
(
res
)
=>
res
,
// Will never happen, but better to be safe.
...
...
node/subsystem-util/src/validator_discovery.rs
View file @
550d84a8
...
...
@@ -87,7 +87,7 @@ pub async fn connect_to_past_session_validators<Context: SubsystemContext>(
.filter_map
(|(
k
,
v
)|
v
.map
(|
v
|
(
v
,
k
)))
.collect
::
<
HashMap
<
AuthorityDiscoveryId
,
ValidatorId
>>
();
let
connections
=
connect_to_authorities
(
ctx
,
authorities
)
.await
?
;
let
connections
=
connect_to_authorities
(
ctx
,
authorities
)
.await
;
Ok
(
ConnectionRequest
{
validator_map
,
...
...
@@ -98,7 +98,7 @@ pub async fn connect_to_past_session_validators<Context: SubsystemContext>(
async
fn
connect_to_authorities
<
Context
:
SubsystemContext
>
(
ctx
:
&
mut
Context
,
validator_ids
:
Vec
<
AuthorityDiscoveryId
>
,
)
->
Result
<
mpsc
::
Receiver
<
(
AuthorityDiscoveryId
,
PeerId
)
>
,
Error
>
{
)
->
mpsc
::
Receiver
<
(
AuthorityDiscoveryId
,
PeerId
)
>
{
const
PEERS_CAPACITY
:
usize
=
8
;
let
(
connected
,
connected_rx
)
=
mpsc
::
channel
(
PEERS_CAPACITY
);
...
...
@@ -110,7 +110,7 @@ async fn connect_to_authorities<Context: SubsystemContext>(
}
))
.await
;
Ok
(
connected_rx
)
connected_rx
}
/// A struct that assists performing multiple concurrent connection requests.
...
...
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment