chore: use hash fn directly (#13379)

This commit is contained in:
Matthias Seitz
2024-12-13 13:28:48 +01:00
committed by GitHub
parent fb649977a1
commit f347977765
5 changed files with 17 additions and 21 deletions

View File

@ -1762,18 +1762,18 @@ where
target: "engine::tree",
?block,
"Failed to validate total difficulty for block {}: {e}",
block.header.hash()
block.hash()
);
return Err(e)
}
if let Err(e) = self.consensus.validate_header(block) {
error!(target: "engine::tree", ?block, "Failed to validate header {}: {e}", block.header.hash());
error!(target: "engine::tree", ?block, "Failed to validate header {}: {e}", block.hash());
return Err(e)
}
if let Err(e) = self.consensus.validate_block_pre_execution(block) {
error!(target: "engine::tree", ?block, "Failed to validate block {}: {e}", block.header.hash());
error!(target: "engine::tree", ?block, "Failed to validate block {}: {e}", block.hash());
return Err(e)
}
@ -2210,7 +2210,7 @@ where
))
})?;
if let Err(e) = self.consensus.validate_header_against_parent(&block, &parent_block) {
warn!(target: "engine::tree", ?block, "Failed to validate header {} against parent: {e}", block.header.hash());
warn!(target: "engine::tree", ?block, "Failed to validate header {} against parent: {e}", block.hash());
return Err(e.into())
}