Update polkadot dependencies (#2509)

* Update polkadot dependencies

* fix formatting error
This commit is contained in:
Egor_P
2023-05-03 14:13:06 +02:00
committed by GitHub
parent e1787c66f4
commit 64cbdc62a1
2 changed files with 80 additions and 81 deletions
+13 -14
View File
@@ -89,14 +89,13 @@ impl BlockAnnounceData {
///
/// This will not check the signature, for this you should use [`BlockAnnounceData::check_signature`].
fn validate(&self, encoded_header: Vec<u8>) -> Result<(), Validation> {
let candidate_hash = if let CompactStatement::Seconded(h) =
self.statement.unchecked_payload()
{
h
} else {
tracing::debug!(target: LOG_TARGET, "`CompactStatement` isn't the candidate variant!",);
return Err(Validation::Failure { disconnect: true })
};
let candidate_hash =
if let CompactStatement::Seconded(h) = self.statement.unchecked_payload() {
h
} else {
tracing::debug!(target: LOG_TARGET, "`CompactStatement` isn't the candidate variant!",);
return Err(Validation::Failure { disconnect: true })
};
if *candidate_hash != self.receipt.hash() {
tracing::debug!(
@@ -303,9 +302,9 @@ where
Ok(Validation::Success { is_new_best: true })
} else if block_number >= known_best_number {
tracing::debug!(
target: LOG_TARGET,
"Validation failed because a justification is needed if the block at the top of the chain."
);
target: LOG_TARGET,
"Validation failed because a justification is needed if the block at the top of the chain."
);
Ok(Validation::Failure { disconnect: false })
} else {
@@ -334,9 +333,9 @@ where
let relay_chain_is_syncing = relay_chain_interface
.is_major_syncing()
.await
.map_err(|e| {
tracing::error!(target: LOG_TARGET, "Unable to determine sync status. {}", e)
})
.map_err(
|e| tracing::error!(target: LOG_TARGET, "Unable to determine sync status. {}", e),
)
.unwrap_or(false);
if relay_chain_is_syncing {