mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 15:21:05 +00:00
naming consistency (#4539)
This commit is contained in:
committed by
GitHub
parent
804e0918f1
commit
a558ee0b57
@@ -65,7 +65,7 @@ pub use polkadot_node_core_chain_selection::ChainSelectionSubsystem;
|
|||||||
pub use polkadot_node_core_dispute_coordinator::DisputeCoordinatorSubsystem;
|
pub use polkadot_node_core_dispute_coordinator::DisputeCoordinatorSubsystem;
|
||||||
pub use polkadot_node_core_provisioner::ProvisionerSubsystem;
|
pub use polkadot_node_core_provisioner::ProvisionerSubsystem;
|
||||||
pub use polkadot_node_core_runtime_api::RuntimeApiSubsystem;
|
pub use polkadot_node_core_runtime_api::RuntimeApiSubsystem;
|
||||||
pub use polkadot_statement_distribution::StatementDistribution as StatementDistributionSubsystem;
|
pub use polkadot_statement_distribution::StatementDistributionSubsystem;
|
||||||
|
|
||||||
/// Arguments passed for overseer construction.
|
/// Arguments passed for overseer construction.
|
||||||
pub struct OverseerGenArgs<'a, Spawner, RuntimeClient>
|
pub struct OverseerGenArgs<'a, Spawner, RuntimeClient>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ impl InherentAfter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A per-relay-parent job for the provisioning subsystem.
|
/// A per-relay-parent job for the provisioning subsystem.
|
||||||
pub struct ProvisioningJob {
|
pub struct ProvisionerJob {
|
||||||
leaf: ActivatedLeaf,
|
leaf: ActivatedLeaf,
|
||||||
receiver: mpsc::Receiver<ProvisionerMessage>,
|
receiver: mpsc::Receiver<ProvisionerMessage>,
|
||||||
backed_candidates: Vec<CandidateReceipt>,
|
backed_candidates: Vec<CandidateReceipt>,
|
||||||
@@ -144,7 +144,7 @@ pub enum Error {
|
|||||||
BackedCandidateOrderingProblem,
|
BackedCandidateOrderingProblem,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl JobTrait for ProvisioningJob {
|
impl JobTrait for ProvisionerJob {
|
||||||
type ToJob = ProvisionerMessage;
|
type ToJob = ProvisionerMessage;
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
type RunArgs = ();
|
type RunArgs = ();
|
||||||
@@ -164,7 +164,7 @@ impl JobTrait for ProvisioningJob {
|
|||||||
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send>> {
|
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send>> {
|
||||||
async move {
|
async move {
|
||||||
let span = leaf.span.clone();
|
let span = leaf.span.clone();
|
||||||
let job = ProvisioningJob::new(leaf, metrics, receiver);
|
let job = ProvisionerJob::new(leaf, metrics, receiver);
|
||||||
|
|
||||||
job.run_loop(sender.subsystem_sender(), PerLeafSpan::new(span, "provisioner"))
|
job.run_loop(sender.subsystem_sender(), PerLeafSpan::new(span, "provisioner"))
|
||||||
.await
|
.await
|
||||||
@@ -173,7 +173,7 @@ impl JobTrait for ProvisioningJob {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ProvisioningJob {
|
impl ProvisionerJob {
|
||||||
fn new(
|
fn new(
|
||||||
leaf: ActivatedLeaf,
|
leaf: ActivatedLeaf,
|
||||||
metrics: Metrics,
|
metrics: Metrics,
|
||||||
@@ -626,5 +626,5 @@ async fn select_disputes(
|
|||||||
.collect())
|
.collect())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The provisioning subsystem.
|
/// The provisioner subsystem.
|
||||||
pub type ProvisioningSubsystem<Spawner> = JobSubsystem<ProvisioningJob, Spawner>;
|
pub type ProvisionerSubsystem<Spawner> = JobSubsystem<ProvisionerJob, Spawner>;
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ const LOG_TARGET: &str = "parachain::statement-distribution";
|
|||||||
const MAX_LARGE_STATEMENTS_PER_SENDER: usize = 20;
|
const MAX_LARGE_STATEMENTS_PER_SENDER: usize = 20;
|
||||||
|
|
||||||
/// The statement distribution subsystem.
|
/// The statement distribution subsystem.
|
||||||
pub struct StatementDistribution {
|
pub struct StatementDistributionSubsystem {
|
||||||
/// Pointer to a keystore, which is required for determining this node's validator index.
|
/// Pointer to a keystore, which is required for determining this node's validator index.
|
||||||
keystore: SyncCryptoStorePtr,
|
keystore: SyncCryptoStorePtr,
|
||||||
/// Receiver for incoming large statement requests.
|
/// Receiver for incoming large statement requests.
|
||||||
@@ -113,7 +113,7 @@ pub struct StatementDistribution {
|
|||||||
metrics: Metrics,
|
metrics: Metrics,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<Context> overseer::Subsystem<Context, SubsystemError> for StatementDistribution
|
impl<Context> overseer::Subsystem<Context, SubsystemError> for StatementDistributionSubsystem
|
||||||
where
|
where
|
||||||
Context: SubsystemContext<Message = StatementDistributionMessage>,
|
Context: SubsystemContext<Message = StatementDistributionMessage>,
|
||||||
Context: overseer::SubsystemContext<Message = StatementDistributionMessage>,
|
Context: overseer::SubsystemContext<Message = StatementDistributionMessage>,
|
||||||
@@ -131,14 +131,14 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl StatementDistribution {
|
impl StatementDistributionSubsystem {
|
||||||
/// Create a new Statement Distribution Subsystem
|
/// Create a new Statement Distribution Subsystem
|
||||||
pub fn new(
|
pub fn new(
|
||||||
keystore: SyncCryptoStorePtr,
|
keystore: SyncCryptoStorePtr,
|
||||||
req_receiver: IncomingRequestReceiver<request_v1::StatementFetchingRequest>,
|
req_receiver: IncomingRequestReceiver<request_v1::StatementFetchingRequest>,
|
||||||
metrics: Metrics,
|
metrics: Metrics,
|
||||||
) -> StatementDistribution {
|
) -> Self {
|
||||||
StatementDistribution { keystore, req_receiver: Some(req_receiver), metrics }
|
Self { keystore, req_receiver: Some(req_receiver), metrics }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1535,7 +1535,7 @@ async fn handle_network_update(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl StatementDistribution {
|
impl StatementDistributionSubsystem {
|
||||||
async fn run(
|
async fn run(
|
||||||
mut self,
|
mut self,
|
||||||
mut ctx: (impl SubsystemContext<Message = StatementDistributionMessage>
|
mut ctx: (impl SubsystemContext<Message = StatementDistributionMessage>
|
||||||
|
|||||||
@@ -703,7 +703,7 @@ fn receiving_from_one_sends_to_another_and_to_candidate_backing() {
|
|||||||
let (statement_req_receiver, _) = IncomingRequest::get_config_receiver();
|
let (statement_req_receiver, _) = IncomingRequest::get_config_receiver();
|
||||||
|
|
||||||
let bg = async move {
|
let bg = async move {
|
||||||
let s = StatementDistribution::new(
|
let s = StatementDistributionSubsystem::new(
|
||||||
Arc::new(LocalKeystore::in_memory()),
|
Arc::new(LocalKeystore::in_memory()),
|
||||||
statement_req_receiver,
|
statement_req_receiver,
|
||||||
Default::default(),
|
Default::default(),
|
||||||
@@ -895,7 +895,7 @@ fn receiving_large_statement_from_one_sends_to_another_and_to_candidate_backing(
|
|||||||
let (statement_req_receiver, mut req_cfg) = IncomingRequest::get_config_receiver();
|
let (statement_req_receiver, mut req_cfg) = IncomingRequest::get_config_receiver();
|
||||||
|
|
||||||
let bg = async move {
|
let bg = async move {
|
||||||
let s = StatementDistribution::new(
|
let s = StatementDistributionSubsystem::new(
|
||||||
make_ferdie_keystore(),
|
make_ferdie_keystore(),
|
||||||
statement_req_receiver,
|
statement_req_receiver,
|
||||||
Default::default(),
|
Default::default(),
|
||||||
@@ -1394,7 +1394,7 @@ fn share_prioritizes_backing_group() {
|
|||||||
let (statement_req_receiver, mut req_cfg) = IncomingRequest::get_config_receiver();
|
let (statement_req_receiver, mut req_cfg) = IncomingRequest::get_config_receiver();
|
||||||
|
|
||||||
let bg = async move {
|
let bg = async move {
|
||||||
let s = StatementDistribution::new(
|
let s = StatementDistributionSubsystem::new(
|
||||||
make_ferdie_keystore(),
|
make_ferdie_keystore(),
|
||||||
statement_req_receiver,
|
statement_req_receiver,
|
||||||
Default::default(),
|
Default::default(),
|
||||||
@@ -1679,7 +1679,7 @@ fn peer_cant_flood_with_large_statements() {
|
|||||||
|
|
||||||
let (statement_req_receiver, _) = IncomingRequest::get_config_receiver();
|
let (statement_req_receiver, _) = IncomingRequest::get_config_receiver();
|
||||||
let bg = async move {
|
let bg = async move {
|
||||||
let s = StatementDistribution::new(
|
let s = StatementDistributionSubsystem::new(
|
||||||
make_ferdie_keystore(),
|
make_ferdie_keystore(),
|
||||||
statement_req_receiver,
|
statement_req_receiver,
|
||||||
Default::default(),
|
Default::default(),
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ pub use polkadot_node_core_candidate_validation::CandidateValidationSubsystem;
|
|||||||
pub use polkadot_node_core_chain_api::ChainApiSubsystem;
|
pub use polkadot_node_core_chain_api::ChainApiSubsystem;
|
||||||
pub use polkadot_node_core_chain_selection::ChainSelectionSubsystem;
|
pub use polkadot_node_core_chain_selection::ChainSelectionSubsystem;
|
||||||
pub use polkadot_node_core_dispute_coordinator::DisputeCoordinatorSubsystem;
|
pub use polkadot_node_core_dispute_coordinator::DisputeCoordinatorSubsystem;
|
||||||
pub use polkadot_node_core_provisioner::ProvisioningSubsystem as ProvisionerSubsystem;
|
pub use polkadot_node_core_provisioner::ProvisionerSubsystem;
|
||||||
pub use polkadot_node_core_runtime_api::RuntimeApiSubsystem;
|
pub use polkadot_node_core_runtime_api::RuntimeApiSubsystem;
|
||||||
pub use polkadot_statement_distribution::StatementDistribution as StatementDistributionSubsystem;
|
pub use polkadot_statement_distribution::StatementDistributionSubsystem;
|
||||||
|
|
||||||
/// Arguments passed for overseer construction.
|
/// Arguments passed for overseer construction.
|
||||||
pub struct OverseerGenArgs<'a, Spawner, RuntimeClient>
|
pub struct OverseerGenArgs<'a, Spawner, RuntimeClient>
|
||||||
|
|||||||
Reference in New Issue
Block a user