perf: remove redundant ommers sealing (#2386)

This commit is contained in:
Roman Krasiuk
2023-04-25 15:53:16 +03:00
committed by GitHub
parent 21ebfee461
commit b4d69e68dc
11 changed files with 18 additions and 48 deletions

View File

@ -182,8 +182,7 @@ pub fn validate_block_standalone(
) -> Result<(), ConsensusError> {
// Check ommers hash
// TODO(onbjerg): This should probably be accessible directly on [Block]
let ommers_hash =
reth_primitives::proofs::calculate_ommers_root(block.ommers.iter().map(|h| h.as_ref()));
let ommers_hash = reth_primitives::proofs::calculate_ommers_root(block.ommers.iter());
if block.header.ommers_hash != ommers_hash {
return Err(ConsensusError::BodyOmmersHashDiff {
got: ommers_hash,