Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rphmeier committed Jul 13, 2023
1 parent 70e07b6 commit 0350d70
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 21 deletions.
5 changes: 4 additions & 1 deletion client/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ where
// We want that collators wait at maximum the relay chain slot duration before starting
// to recover blocks. Additionally, we wait at least half the slot time to give the
// relay chain the chance to increase availability.
RecoveryDelayRange { min: relay_chain_slot_duration / 2, max: relay_chain_slot_duration }
RecoveryDelayRange {
min: relay_chain_slot_duration / 2,
max: relay_chain_slot_duration,
}
},
DARecoveryProfile::FullNode => {
// Full nodes should at least wait 2.5 minutes (assuming 6 seconds slot duration) and
Expand Down
11 changes: 6 additions & 5 deletions parachain-template/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, Slo
use cumulus_client_consensus_common::{
ParachainBlockImport as TParachainBlockImport, ParachainConsensus,
};
use cumulus_client_service::{
DARecoveryProfile,
build_network, build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks, BuildNetworkParams, StartRelayChainTasksParams,
};
#[allow(deprecated)]
use cumulus_client_service::old_consensus;
use cumulus_client_service::{
build_network, build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks,
BuildNetworkParams, DARecoveryProfile, StartRelayChainTasksParams,
};
use cumulus_primitives_core::ParaId;
use cumulus_relay_chain_interface::RelayChainInterface;

Expand Down Expand Up @@ -297,7 +297,8 @@ async fn start_node_impl(
relay_chain_slot_duration,
recovery_handle: Box::new(overseer_handle.clone()),
sync_service: sync_service.clone(),
}).await?;
})
.await?;

if validator {
let parachain_consensus = build_consensus(
Expand Down
24 changes: 15 additions & 9 deletions polkadot-parachain/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, Slo
use cumulus_client_consensus_common::{
ParachainBlockImport as TParachainBlockImport, ParachainCandidate, ParachainConsensus,
};
#[allow(deprecated)]
use cumulus_client_service::old_consensus;
use cumulus_client_service::{
build_network, build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks,
DARecoveryProfile, StartRelayChainTasksParams, BuildNetworkParams,
BuildNetworkParams, DARecoveryProfile, StartRelayChainTasksParams,
};
#[allow(deprecated)]
use cumulus_client_service::old_consensus;
use cumulus_primitives_core::{
relay_chain::{Hash as PHash, PersistedValidationData},
ParaId,
Expand Down Expand Up @@ -483,7 +483,8 @@ where
relay_chain_slot_duration,
recovery_handle: Box::new(overseer_handle.clone()),
sync_service: sync_service.clone(),
}).await?;
})
.await?;

if validator {
let parachain_consensus = build_consensus(
Expand Down Expand Up @@ -511,7 +512,8 @@ where
spawner,
key: collator_key.expect("Command line arguments do not allow this. qed"),
parachain_consensus,
}).await;
})
.await;
}

start_network.start_network();
Expand Down Expand Up @@ -684,7 +686,8 @@ where
relay_chain_slot_duration,
recovery_handle: Box::new(overseer_handle.clone()),
sync_service: sync_service.clone(),
}).await?;
})
.await?;

if validator {
let parachain_consensus = build_consensus(
Expand Down Expand Up @@ -712,7 +715,8 @@ where
spawner,
key: collator_key.expect("Command line arguments do not allow this. qed"),
parachain_consensus,
}).await;
})
.await;
}

start_network.start_network();
Expand Down Expand Up @@ -1455,7 +1459,8 @@ where
relay_chain_slot_duration,
recovery_handle: Box::new(overseer_handle.clone()),
sync_service: sync_service.clone(),
}).await?;
})
.await?;

if validator {
let parachain_consensus = build_consensus(
Expand Down Expand Up @@ -1483,7 +1488,8 @@ where
spawner,
key: collator_key.expect("Command line arguments do not allow this. qed"),
parachain_consensus,
}).await;
})
.await;
}

start_network.start_network();
Expand Down
4 changes: 3 additions & 1 deletion test/relay-sproof-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ impl RelayStateSproofBuilder {
if let Some(para_head) = self.included_para_head {
insert(relay_chain::well_known_keys::para_head(self.para_id), para_head.encode());
}
if let Some(relay_dispatch_queue_remaining_capacity) = self.relay_dispatch_queue_remaining_capacity {
if let Some(relay_dispatch_queue_remaining_capacity) =
self.relay_dispatch_queue_remaining_capacity
{
insert(
relay_chain::well_known_keys::relay_dispatch_queue_remaining_capacity(
self.para_id,
Expand Down
13 changes: 8 additions & 5 deletions test/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ use cumulus_client_consensus_common::{
ParachainBlockImport as TParachainBlockImport, ParachainCandidate, ParachainConsensus,
};
use cumulus_client_pov_recovery::RecoveryHandle;
use cumulus_client_service::{
build_network, prepare_node_config, start_relay_chain_tasks, DARecoveryProfile, StartRelayChainTasksParams, BuildNetworkParams,
};
#[allow(deprecated)]
use cumulus_client_service::old_consensus;
use cumulus_client_service::{
build_network, prepare_node_config, start_relay_chain_tasks, BuildNetworkParams,
DARecoveryProfile, StartRelayChainTasksParams,
};
use cumulus_primitives_core::ParaId;
use cumulus_relay_chain_inprocess_interface::RelayChainInProcessInterface;
use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult};
Expand Down Expand Up @@ -403,7 +404,8 @@ where
relay_chain_slot_duration: relay_chain_slot_duration.clone(),
recovery_handle,
sync_service: sync_service.clone(),
}).await?;
})
.await?;

if let Some(collator_key) = collator_key {
let parachain_consensus: Box<dyn ParachainConsensus<Block>> = match consensus {
Expand Down Expand Up @@ -457,7 +459,8 @@ where
parachain_consensus,
key: collator_key,
overseer_handle,
}).await;
})
.await;
}

start_network.start_network();
Expand Down

0 comments on commit 0350d70

Please sign in to comment.