mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 20:47:56 +00:00
Collation protocol: stricter validators (#2810)
* guide: declare one para as a collator * add ParaId to Declare messages and clean up * fix build * fix the testerinos * begin adding keystore to collator-protocol * remove request_x_ctx * add core_for_group * add bump_rotation * add some more helpers to subsystem-util * change signing_key API to take ref * determine current and next para assignments * disconnect collators who are not on current or next para * add collator peer count metric * notes for later * some fixes * add data & keystore to test state * add a test utility for answering runtime API requests * fix existing collator tests * add new tests * remove sc_keystore * update cargo lock Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
committed by
GitHub
parent
94b0ccc8f1
commit
11b8e4c821
@@ -46,7 +46,7 @@ pub async fn connect_to_validators<Context: SubsystemContext>(
|
||||
validators: Vec<ValidatorId>,
|
||||
peer_set: PeerSet,
|
||||
) -> Result<ConnectionRequest, Error> {
|
||||
let current_index = crate::request_session_index_for_child_ctx(relay_parent, ctx).await?.await??;
|
||||
let current_index = crate::request_session_index_for_child(relay_parent, ctx.sender()).await.await??;
|
||||
connect_to_validators_in_session(
|
||||
ctx,
|
||||
relay_parent,
|
||||
@@ -64,11 +64,11 @@ pub async fn connect_to_validators_in_session<Context: SubsystemContext>(
|
||||
peer_set: PeerSet,
|
||||
session_index: SessionIndex,
|
||||
) -> Result<ConnectionRequest, Error> {
|
||||
let session_info = crate::request_session_info_ctx(
|
||||
let session_info = crate::request_session_info(
|
||||
relay_parent,
|
||||
session_index,
|
||||
ctx,
|
||||
).await?.await??;
|
||||
ctx.sender(),
|
||||
).await.await??;
|
||||
|
||||
let (session_validators, discovery_keys) = match session_info {
|
||||
Some(info) => (info.validators, info.discovery_keys),
|
||||
|
||||
Reference in New Issue
Block a user