style: Migrate to stable-only rustfmt configuration
- Remove nightly-only features from .rustfmt.toml and vendor/ss58-registry/rustfmt.toml - Removed features: imports_granularity, wrap_comments, comment_width, reorder_impl_items, spaces_around_ranges, binop_separator, match_arm_blocks, trailing_semicolon, trailing_comma - Format all 898 affected files with stable rustfmt - Ensures long-term reliability without nightly toolchain dependency
This commit is contained in:
@@ -231,8 +231,8 @@ where
|
||||
let force_authoring = config.force_authoring;
|
||||
let disable_grandpa = config.disable_grandpa;
|
||||
let name = config.network.node_name.clone();
|
||||
let backoff_authoring_blocks = if !force_authoring_backoff &&
|
||||
(config.chain_spec.is_pezkuwi() || config.chain_spec.is_kusama())
|
||||
let backoff_authoring_blocks = if !force_authoring_backoff
|
||||
&& (config.chain_spec.is_pezkuwi() || config.chain_spec.is_kusama())
|
||||
{
|
||||
// the block authoring backoff is disabled by default on production networks
|
||||
None
|
||||
@@ -240,9 +240,9 @@ where
|
||||
let mut backoff =
|
||||
pezsc_consensus_slots::BackoffAuthoringOnFinalizedHeadLagging::default();
|
||||
|
||||
if config.chain_spec.is_pezkuwichain() ||
|
||||
config.chain_spec.is_versi() ||
|
||||
config.chain_spec.is_dev()
|
||||
if config.chain_spec.is_pezkuwichain()
|
||||
|| config.chain_spec.is_versi()
|
||||
|| config.chain_spec.is_dev()
|
||||
{
|
||||
// on testnets that are in flux (like pezkuwichain or versi), finality has stalled
|
||||
// sometimes due to operational issues and it's annoying to slow down block
|
||||
@@ -316,8 +316,8 @@ where
|
||||
//
|
||||
// Collators and teyrchain full nodes require the collator and validator networking to send
|
||||
// collations and to be able to recover PoVs.
|
||||
let notification_services = if role.is_authority() ||
|
||||
is_teyrchain_node.is_running_alongside_teyrchain_node()
|
||||
let notification_services = if role.is_authority()
|
||||
|| is_teyrchain_node.is_running_alongside_teyrchain_node()
|
||||
{
|
||||
use pezkuwi_network_bridge::{peer_sets_info, IsAuthority};
|
||||
let is_authority = if role.is_authority() { IsAuthority::Yes } else { IsAuthority::No };
|
||||
|
||||
@@ -450,10 +450,12 @@ pub fn build_full<OverseerGenerator: OverseerGen>(
|
||||
});
|
||||
|
||||
match config.network.network_backend {
|
||||
pezsc_network::config::NetworkBackendType::Libp2p =>
|
||||
new_full::<_, pezsc_network::NetworkWorker<Block, Hash>>(config, params),
|
||||
pezsc_network::config::NetworkBackendType::Litep2p =>
|
||||
new_full::<_, pezsc_network::Litep2pNetworkBackend>(config, params),
|
||||
pezsc_network::config::NetworkBackendType::Libp2p => {
|
||||
new_full::<_, pezsc_network::NetworkWorker<Block, Hash>>(config, params)
|
||||
},
|
||||
pezsc_network::config::NetworkBackendType::Litep2p => {
|
||||
new_full::<_, pezsc_network::Litep2pNetworkBackend>(config, params)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -295,10 +295,11 @@ where
|
||||
.collation_generation(DummySubsystem)
|
||||
.collator_protocol({
|
||||
let side = match is_teyrchain_node {
|
||||
IsTeyrchainNode::Collator(_) | IsTeyrchainNode::FullNode =>
|
||||
IsTeyrchainNode::Collator(_) | IsTeyrchainNode::FullNode => {
|
||||
return Err(Error::Overseer(SubsystemError::Context(
|
||||
"build validator overseer for teyrchain node".to_owned(),
|
||||
))),
|
||||
)))
|
||||
},
|
||||
IsTeyrchainNode::No => ProtocolSide::Validator {
|
||||
keystore: keystore.clone(),
|
||||
eviction_policy: Default::default(),
|
||||
@@ -466,10 +467,11 @@ where
|
||||
.collation_generation(CollationGenerationSubsystem::new(Metrics::register(registry)?))
|
||||
.collator_protocol({
|
||||
let side = match is_teyrchain_node {
|
||||
IsTeyrchainNode::No =>
|
||||
IsTeyrchainNode::No => {
|
||||
return Err(Error::Overseer(SubsystemError::Context(
|
||||
"build teyrchain node overseer for validator".to_owned(),
|
||||
))),
|
||||
)))
|
||||
},
|
||||
IsTeyrchainNode::Collator(collator_pair) => ProtocolSide::Collator {
|
||||
peer_id: network_service.local_peer_id(),
|
||||
collator_pair,
|
||||
|
||||
@@ -251,8 +251,9 @@ where
|
||||
fn block_header(&self, hash: Hash) -> Result<PezkuwiHeader, ConsensusError> {
|
||||
match HeaderProvider::header(self.backend.header_provider(), hash) {
|
||||
Ok(Some(header)) => Ok(header),
|
||||
Ok(None) =>
|
||||
Err(ConsensusError::ChainLookup(format!("Missing header with hash {:?}", hash,))),
|
||||
Ok(None) => {
|
||||
Err(ConsensusError::ChainLookup(format!("Missing header with hash {:?}", hash,)))
|
||||
},
|
||||
Err(e) => Err(ConsensusError::ChainLookup(format!(
|
||||
"Lookup failed for header with hash {:?}: {:?}",
|
||||
hash, e,
|
||||
@@ -263,8 +264,9 @@ where
|
||||
fn block_number(&self, hash: Hash) -> Result<BlockNumber, ConsensusError> {
|
||||
match HeaderProvider::number(self.backend.header_provider(), hash) {
|
||||
Ok(Some(number)) => Ok(number),
|
||||
Ok(None) =>
|
||||
Err(ConsensusError::ChainLookup(format!("Missing number with hash {:?}", hash,))),
|
||||
Ok(None) => {
|
||||
Err(ConsensusError::ChainLookup(format!("Missing number with hash {:?}", hash,)))
|
||||
},
|
||||
Err(e) => Err(ConsensusError::ChainLookup(format!(
|
||||
"Lookup failed for number with hash {:?}: {:?}",
|
||||
hash, e,
|
||||
@@ -490,8 +492,9 @@ where
|
||||
{
|
||||
// No approved ancestors means target hash is maximal vote.
|
||||
None => (target_hash, target_number, Vec::new()),
|
||||
Some(HighestApprovedAncestorBlock { number, hash, descriptions }) =>
|
||||
(hash, number, descriptions),
|
||||
Some(HighestApprovedAncestorBlock { number, hash, descriptions }) => {
|
||||
(hash, number, descriptions)
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -523,8 +526,8 @@ where
|
||||
|
||||
let (lag, subchain_head) = {
|
||||
// Prevent sending flawed data to the dispute-coordinator.
|
||||
if Some(subchain_block_descriptions.len() as _) !=
|
||||
subchain_number.checked_sub(target_number)
|
||||
if Some(subchain_block_descriptions.len() as _)
|
||||
!= subchain_number.checked_sub(target_number)
|
||||
{
|
||||
gum::error!(
|
||||
LOG_TARGET,
|
||||
|
||||
@@ -119,8 +119,9 @@ pub(crate) fn try_upgrade_db_to_next_version(
|
||||
None if db_kind == DatabaseKind::RocksDB => CURRENT_VERSION,
|
||||
// No version file. `ParityDB` did not previously have a version defined.
|
||||
// We handle this as a `0 -> 1` migration.
|
||||
None if db_kind == DatabaseKind::ParityDB =>
|
||||
migrate_from_version_0_to_1(db_path, db_kind)?,
|
||||
None if db_kind == DatabaseKind::ParityDB => {
|
||||
migrate_from_version_0_to_1(db_path, db_kind)?
|
||||
},
|
||||
None => unreachable!(),
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user