Skip to content

Commit ce9fc12

Browse files
committed
refactor: move request_disabled_validators call into try_join
1 parent 283fec0 commit ce9fc12

File tree

1 file changed

+5
-4
lines changed
  • polkadot/node/subsystem-util/src

1 file changed

+5
-4
lines changed

polkadot/node/subsystem-util/src/lib.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -475,19 +475,20 @@ impl Validator {
475475
where
476476
S: SubsystemSender<RuntimeApiMessage>,
477477
{
478-
// Note: request_validators and request_session_index_for_child do not and cannot
479-
// run concurrently: they both have a mutable handle to the same sender.
478+
// Note: request_validators, request_disabled_validators and request_session_index_for_child
479+
// do not and cannot run concurrently: they both have a mutable handle to the same sender.
480480
// However, each of them returns a oneshot::Receiver, and those are resolved concurrently.
481-
let (validators, session_index) = futures::try_join!(
481+
let (validators, disabled_validators, session_index) = futures::try_join!(
482482
request_validators(parent, sender).await,
483+
request_disabled_validators(parent, sender).await,
483484
request_session_index_for_child(parent, sender).await,
484485
)?;
485486

486487
let signing_context = SigningContext { session_index: session_index?, parent_hash: parent };
487488

488489
let validators = validators?;
489490

490-
let disabled_validators = request_disabled_validators(parent, sender).await.await??;
491+
let disabled_validators = disabled_validators?;
491492

492493
Self::construct(&validators, &disabled_validators, signing_context, keystore)
493494
}

0 commit comments

Comments
 (0)