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

Commit

Permalink
revert unrelated fmt changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ordian committed Feb 27, 2023
1 parent ab08d67 commit 62e3831
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 18 deletions.
5 changes: 2 additions & 3 deletions node/core/candidate-validation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ where
// reasonably sure that this is some local problem on the current node.
Err(ValidationFailed(e))
},
Ok(res) => {
Ok(res) =>
if res.head_data.hash() != candidate_receipt.descriptor.para_head {
gum::info!(target: LOG_TARGET, ?para_id, "Invalid candidate (para_head)");
Ok(ValidationResult::Invalid(InvalidCandidate::ParaHeadHashMismatch))
Expand All @@ -658,8 +658,7 @@ where
} else {
Ok(ValidationResult::Valid(outputs, persisted_validation_data))
}
}
},
},
}
}

Expand Down
5 changes: 2 additions & 3 deletions node/core/chain-selection/src/db_backend/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,12 @@ impl Backend for DbBackend {

let val = stagnant_at_iter
.filter_map(|r| match r {
Ok((k, v)) => {
Ok((k, v)) =>
match (decode_stagnant_at_key(&mut &k[..]), <Vec<_>>::decode(&mut &v[..]).ok())
{
(Some(at), Some(stagnant_at)) => Some(Ok((at, stagnant_at))),
_ => None,
}
},
},
Err(e) => Some(Err(e)),
})
.enumerate()
Expand Down
5 changes: 2 additions & 3 deletions node/network/bridge/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,8 @@ impl Network for Arc<NetworkService<Block, Hash>> {
match pending_response
.send(Err(RequestFailure::Network(OutboundFailure::DialFailure)))
{
Err(_) => {
gum::debug!(target: LOG_TARGET, "Sending failed request response failed.")
},
Err(_) =>
gum::debug!(target: LOG_TARGET, "Sending failed request response failed."),
Ok(_) => {},
}
return
Expand Down
5 changes: 2 additions & 3 deletions node/network/collator-protocol/src/validator_side/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,8 @@ impl CollationsPerRelayParent {
self.waiting_collation = next.as_ref().map(|(_, collator_id)| collator_id.clone());
next
},
CollationStatus::WaitingOnValidation | CollationStatus::Fetching => {
unreachable!("We have reset the status above!")
},
CollationStatus::WaitingOnValidation | CollationStatus::Fetching =>
unreachable!("We have reset the status above!"),
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions node/network/statement-distribution/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ pub fn log_error(result: Result<()>, ctx: &'static str) -> std::result::Result<(
match result.into_nested()? {
Err(jfyi) => {
match jfyi {
JfyiError::RequestedUnannouncedCandidate(_, _) => {
gum::warn!(target: LOG_TARGET, error = %jfyi, ctx)
},
JfyiError::RequestedUnannouncedCandidate(_, _) =>
gum::warn!(target: LOG_TARGET, error = %jfyi, ctx),
_ => gum::debug!(target: LOG_TARGET, error = %jfyi, ctx),
}
Ok(())
Expand Down
5 changes: 2 additions & 3 deletions node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ pub fn open_database(db_source: &DatabaseSource) -> Result<Arc<dyn Database>, Er
path.parent().ok_or(Error::DatabasePathRequired)?.into(),
parachains_db::CacheSizes::default(),
)?,
DatabaseSource::Auto { paritydb_path, rocksdb_path, .. } => {
DatabaseSource::Auto { paritydb_path, rocksdb_path, .. } =>
if paritydb_path.is_dir() && paritydb_path.exists() {
parachains_db::open_creating_paritydb(
paritydb_path.parent().ok_or(Error::DatabasePathRequired)?.into(),
Expand All @@ -312,8 +312,7 @@ pub fn open_database(db_source: &DatabaseSource) -> Result<Arc<dyn Database>, Er
rocksdb_path.clone(),
parachains_db::CacheSizes::default(),
)?
}
},
},
DatabaseSource::Custom { .. } => {
unimplemented!("No polkadot subsystem db for custom source.");
},
Expand Down

0 comments on commit 62e3831

Please sign in to comment.