chore: integrate Test trait for sealed types (#13746)

This commit is contained in:
Matthias Seitz
2025-01-09 09:06:28 +01:00
committed by GitHub
parent d0684cf8bb
commit 383eb2331c
7 changed files with 119 additions and 17 deletions

View File

@ -1809,7 +1809,7 @@ where
return Err(e)
}
if let Err(e) = self.consensus.validate_header(block) {
if let Err(e) = self.consensus.validate_header(block.sealed_header()) {
error!(target: "engine::tree", ?block, "Failed to validate header {}: {e}", block.hash());
return Err(e)
}
@ -2248,7 +2248,9 @@ where
block.parent_hash().into(),
))
})?;
if let Err(e) = self.consensus.validate_header_against_parent(&block, &parent_block) {
if let Err(e) =
self.consensus.validate_header_against_parent(block.sealed_header(), &parent_block)
{
warn!(target: "engine::tree", ?block, "Failed to validate header {} against parent: {e}", block.hash());
return Err(e.into())
}